Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor fastapi_app #4

Open
santyr opened this issue Dec 22, 2023 · 0 comments
Open

Refactor fastapi_app #4

santyr opened this issue Dec 22, 2023 · 0 comments
Assignees

Comments

@santyr
Copy link
Contributor

santyr commented Dec 22, 2023

Refactor and split the fast_api app into multiple files for better readability and maintainability; organize the code into several modules based on their functionality.

Suggested structure:

Main Application File (main.py): Contains the FastAPI app creation and route definitions.

Configuration and Environment Variables (config.py): Handles loading environment variables and configuration settings.

Models and Schemas (models.py): Contains Pydantic models for request and response schemas.

Utility Functions (utils.py): Includes various utility functions like convert_to_sats, create_invoice, etc.

Database Operations (database.py): Manages database operations, like storing and retrieving data.

External API Integrations (external_apis.py): Functions that interact with external APIs like YouTube API, payment API, etc.

Async Tasks (tasks.py): Asynchronous tasks such as triggering the feeder, handling payments, etc.

Logging (logging.py): Setup and configurations for logging.

@santyr santyr self-assigned this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant