Skip to content

ddc/code1

Repository files navigation

Code1 and Code2

Code style: black Python

Project build on FastApi using JWT token with kafka to manage requests to PostgreSQL database

Models

See Models

Migrations

See Migrations/README.md

Variables

Variables .env file is requried.
Sample file can be found at .env.sample

Usage

docker-compose up --build -d

Run Tests

docker-compose -f docker-compose_test.yml run --rm pytest_app && docker-compose down

Endpoints

  1. Healthcheck
  2. Token
  3. Token Info
  4. Register an user
    • This is a POST endpoint to register a user sending data to kafka
      • http://127.0.0.1:8080/v1/register
        • body:
          {
              "username": "user3",
              "password": "user3",
              "first_name": "user3",
              "middle_name": "user3",
              "last_name": "user3",
              "email": "user3@user3.com",
              "last_login": null,
              "active": true
          }
          
  5. Update a user
    • This is a POST endpoint to update a user sending data to kafka
      • http://127.0.0.1:8080/v1/update/{user_id}
        • body:
          {
              "username": "user3",
              "password": "user3",
              "first_name": "user3",
              "middle_name": "user3",
              "last_name": "user3",
              "email": "user3@user3.com",
              "last_login": null,
              "active": true
          }
          
  6. Change a user password
  7. User Info by username
  8. User Info by user_id
  9. Get all users

Tools & Libraries

This template uses the following Python libraries to function. Documentation can be found at the links provided:


For ArionKoder

  1. Data Pipeline
  2. Custom Async/Sync Context Manager for database connection
    • Manages connections to database
    • Provides proper cleanup in case of exceptions
    • Includes detailed logging and performance metrics
    • Using My own databases project: ddcDatabases

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published