Skip to main content

No project description provided

Project description

PyPi Version


TLDR

  • A versatile framework for building FastAPI applications with dynamic model generation.
  • Easily define your data models and let the framework auto-generate corresponding CRUD API routes.
  • Make use of async database operations for improved performance.
  • Tailor to a wide range of applications from simple CRUD APIs to complex data management systems.

animated


Overview

This project is a robust and scalable FastAPI framework designed for efficient data management and API development. Leveraging the power of Python's async capabilities and SQLAlchemy for database interactions, this framework offers a versatile approach to creating APIs with dynamic model generation and flexible storage solutions.

Key Features

  • Dynamic API Route Generation: Automatically generates API routes based on configurable entities.
  • Modular Storage Management: Integrates with PostgreSQL, ensuring efficient data storage and retrieval.
  • Type-Safe Operations: Utilizes Pydantic for rigorous data validation and type checking.
  • Asynchronous Support: Leverages Python's async features for non-blocking database operations.
  • Scalable Architecture: Designed to accommodate growing data needs and additional functionalities.

Use Cases

  • Rapid API Development: Streamlines the process of creating and deploying APIs for data-intensive applications.
  • Customizable Data Models: Tailor data models and API endpoints to specific business requirements.
  • Data Management: Ideal for applications requiring robust database operations, including CRMs, e-commerce platforms, and content management systems.

Getting Started

To get started with this framework:

  1. Installation: Clone the repository and install dependencies using Poetry.

    git clone <repository-url>
    cd <repository-name>
    poetry install
    
  2. Configuration: Set up your database credentials and other configurations in examples/config.py.

  3. Run the Application:

    poetry run python examples/app.py
    

Examples

Defining a Configurable Entity:

# examples/config.py
from dyapi.entities.config import Config, ConfigField

configs: list[Config] = [
    Config(
        name="Entity1",
        api_tags=["Entity1"],
        fields=[
            ConfigField(name="field_1", type=int, location="path"),
            # Add more fields as needed
        ],
    ),
]

Starting the Server: Run the server with Uvicorn:

poetry run uvicorn examples.app:application --reload

Contributing

We welcome contributions! Please read our contributing guidelines for instructions on how to submit pull requests.

License

This project is licensed under MIT License.


For more detailed information, refer to the documentation. Happy coding!


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

dyapi-0.9.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dyapi-0.9.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file dyapi-0.9.1.tar.gz.

File metadata

  • Download URL: dyapi-0.9.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Darwin/23.0.0

File hashes

Hashes for dyapi-0.9.1.tar.gz
Algorithm Hash digest
SHA256 22c5851bbd0b1cf5833d65be2e1fe3e54958d6ffd1cbbf0ce3fd65287d77072f
MD5 24a12929538d4d9aa6b2c1e2d8ff8bb9
BLAKE2b-256 6a74420160f52d35a0229ba181298b40ab9617f06eea69d41a15c7f280aaff21

See more details on using hashes here.

File details

Details for the file dyapi-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: dyapi-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Darwin/23.0.0

File hashes

Hashes for dyapi-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb387846ce2e919e65afdf6e0a009aa35ff973ddcea343ffd8f46f4ab169820
MD5 0dba8fe1e5dda490abf69c90a98c53ff
BLAKE2b-256 6f107fa79735ee95c104dfd7a161b5431053e3f9839ac2e06184f3247bb3f0e9

See more details on using hashes here.

Supported by

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