Best Flask open-source libraries and packages

Auth

Yume auth micro-service
Updated 1 year ago

Yume auth


    Yume


    The AI-powered social wish-list platform

Yume auth is the micro-service that handles the authorization, authentication and security-based requests of Yume.

This is a micro-service to serve as an example of how to develop an scalable (architecture & tech) micro-service using python, flask and a combination oh HTTP & Event-based requets

Table of Contents generated with DocToc

Gettings started

Before getting started you need poetry as package manager.

Clone the repository

git clone https://gagocarrilloedgar/yume-auth

Local development (In progress)

Install the dependencies, take a look at Python with pipenv for more info.

poetry init

Run the migrations

poetry run migrate
poetry run upgrade

And start the server:

# Copy the env.example file
cp .env.example .env

#Start it
poetry run start

Formating and linting

Project structure

[TBD]

Development convections

This section provide the branc, commit adn test convection for working with the project while following best practices

Branch naming

A git branch should start with a category. Pick one of these: feature, bugfix, hotfix, or test:

  • feature is for adding, refactoring or removing a feature.
  • bugfix is for fixing a bug.
  • hotfix is for changing code with a temporary solution and/or without following the usual process (usually because of an emergency).
  • test is for experimenting outside of an issue/ticket.

Branch reference

After the category, there should be a / followed by the reference of the issue/ticket you are working on. If there's no reference, just add no-ref.

Branch description

After the reference, there should be another / followed by a description which sums up the purpose of this specific branch. This description should be short and "kebab-cased".

By default, you can use the title of the issue/ticket you are working on. Just replace any special character by "-".

Branch name examples

git branch <category/reference/description-in-kebab-case>
  • You need to add, refactor or remove a feature: git branch feature/<notion-story-id>/create-new-button-component
  • You need to fix a bug: git branch bugfix/<notion-story-id>/button-overlap-form-on-mobile
  • You need to fix a bug really fast (possibly with a temporary solution): git branch hotfix/no-ref/registration-form-not-working
  • You need to experiment outside of an issue/ticket: git branch test/no-ref/refactor-components-with-atomic-design

Convectional commits

The Conventional Commits specification is a lightweight convention on top of commit messages. If you want to read more about it: Conventional commits

[TBD]-> Look for husky and lint-staged alternatives in Python:

The tipical categories are:

  • feat is for adding a new feature
  • fix is for fixing a bug
  • refactor is for changing code for peformance or convenience purpose (e.g. readibility)
  • chore is for everything else (writing documentation, formatting, adding tests, cleaning useless code etc.)
  • docs is to add documentation (readme, swagger, storybook, etc).

If you event wan to add more semantic to the commit you add a scope:

git commit <category(scope): description>

One example could be (taking into account you are developing something related to the layout and its a new feature).

git commit <feat(layout): sidenav redirection added>

Testing

[TBD]

Yume related repositories

For more info regarding all the repositories that include Yume take a look at: Yume's github

Error resolution

If you are having environment error in VSCode make sure you have selected the correct python interpreter:

Inside vscode run:

cmd + p

Search for:

> Python: select interpreter

Then select the one with poetry if tou are using that.

References

License

MIT