Skip to main content

Libraries that have models and methods to handle user authentication

Project description

FISHAUTH

FISHAUTH is a library that allows you to manage models to create an authentication system

Installation

To install, run pip install fishauth

Basic Usage

Usage of Alembic starts with creation of the Migration Environment. This is a directory of scripts that is specific to a particular application. The migration environment is created just once, and is then maintained along with the application’s source code itself. The environment is created using the init command of Alembic, and is then customizable to suit the specific needs of the application.

The structure of this environment, including some generated migration scripts, looks like:

yourproject/
alembic/
    env.py
    README
    script.py.mako
    versions/
        3512b954651e_migrations1.py
        2b1ae634e5cd_migrations2.py
        3adcc9a56557_migrationsN.py

Now in env.py in our alembic folder, we have to make some changes. To detect auto changes by alembic we need to give our model path to env.py

# env.py

from fishauth.models.base import Base as BaseFish
target_metadata = [BaseFish.metadata,...,Base.metadata1,Base.metadata1,Base.metadataN ]

As shown above, we have to give the model base file to alembic env file. Now we are all set for our first migration.

alembic revision --autogenerate -m "First commit"

Using the above command alembic generate our first migration commit file in versions folder. you can see the version file now in the versions folder.

Once this file generates we are ready for database migration.

alembic upgrade head

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fishauth-0.1.7.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

fishauth-0.1.7-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file fishauth-0.1.7.tar.gz.

File metadata

  • Download URL: fishauth-0.1.7.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for fishauth-0.1.7.tar.gz
Algorithm Hash digest
SHA256 10dfebee1ba5d85a1dca835d1adc8e1e9b883ff9545026cd8658b3b4fe3d82a8
MD5 805ea109b297b86e0531321d9cb84a03
BLAKE2b-256 6b120128a7faa3b2d295688e48d09f6ca6c98f04173951a276cef7c33e5ed18e

See more details on using hashes here.

File details

Details for the file fishauth-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: fishauth-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for fishauth-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9057cab121427f4a482e7756f0e97ffd9f4d8fd611b6ad594e38c3342d975c74
MD5 848ad5dc87831433ef1e6fba7a1884a0
BLAKE2b-256 185ce1e661715ef6d0f9eb27bc207e94f5030562b93a432754a07f84d8d4bb71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page