Coder Social home page Coder Social logo

proxy-python's Introduction

proxy-python

Coverage Release Tagging Test codecov

Description

Proxy service intended to forward traffic between clients and gateway-java so they don't need to suffer SOAP

Development

You will follow this guide as you are in the root of repository.

Python environment

First of all you need to setup your python environment.

python -m venv venv

Once created, activate it:

  • Windows
# If you prefer CMD
./venv/Scripts/activate.bat

# If you prefer PowerShell
./venv/Scripts/Activate/ps1
  • Linux
source ./venv/bin/activate

Finally install the dependencies

pip install -r requirements.txt

Services

Make sure you setup the needed services.

docker compose up -d

Testing

coverage run -m pytest

Formatting and linting

If you installed the recommended extensions for VSCode, you may have the formatting and linting configured out of the box.

Additionally, you may need to configure black to format python files with the following steps:

  • Open the command palette (Ctrl + Shift + P)
  • Search Format Document With...
  • Search Configure Default Formatter...
  • Select "Black Formatter"

You can also run the following commands to format and lint the code from the console:

# Check format
black --check .

# Format all python files
black .

# Check lint
ruff check .

# Fix lint (if possible)
ruff check --fix .

Coverage

circle square

proxy-python's People

Contributors

pedrochaparro avatar shoriwe avatar miguelmrojas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

proxy-python's Issues

docs: README

Write a readme with:

  • Tittle
  • Badges
  • Development environment setup
  • Coverage report

ci: Proposal to add a linter and formatter

Hi @MiguelMRojas, @andre154 ๐Ÿ‘‹.

Currently, your project doesn't have any code formatting or linting tools configured. What do you think about adding the following packages to your project:

  • black: It's a Python code formatter, similar to prettier in JavaScript. There's even a VsCode extension available to automatically format files when you save changes.
  • Pylint: It's a Python code linter, similar to eslint in JavaScript. It also offers a VsCode extension. While I haven't personally used it, it can help detect issues like unused imports, variables, and more, as mentioned on their website.

Please note that this isn't mandatory, but it can assist in maintaining a consistent code style and catching errors early in the development process.

docs: Update openapi spec

Remember that you should update your specification to align with the .NET proxy.

For instance, it appears that you're receiving the user token in the JSON body, while the .NET proxy is receiving it as a Bearer token.

ci-cd: frontend python

Continuous integration

  • On push to main: build and release and coverage
  • On pull request to dev: test
  • On push to dev: Versioning

fix: CORS is not working when using the Dockerfile

How to reproduce?

Run the following command from the react repository.

docker-compose up

Now, try, to send any request from the react client. All the request should be rejected by CORS.

Possible solution

Enable all host by default in the CORS configuration.

fix: Cannot move files to the root directory

Uses should be able to move their files to their root directory by sending a null UUID to the Proxy. Just validate if the target_directory_uuid is a valid UUID if its not null.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.