BrandalBase represents a sophisticated backend framework meticulously engineered to expedite application development. This acceleration is achieved through the provision of pre-integrated functionalities, encompassing dynamic model management, automated API generation, and highly adaptable database schemas.
-
Dynamic Model Management: This feature facilitates the definition of data models utilizing a streamlined JSON format, thereby enabling BrandalBase to autonomously manage subsequent operational requirements.
-
Automated API Generation: API endpoints, essential for fundamental CRUD (Create, Read, Update, Delete) operations, are systematically generated. This automation is directly derived from the meticulously defined models within the framework.
-
Robust Database Migration Capabilities: Leveraging the power of Alembic, BrandalBase ensures seamless and meticulously managed database schema migrations, thereby maintaining data integrity and structural consistency.
-
Flexible Configuration Architecture: The framework is designed for extensive configurability, supporting integration with diverse database systems, including but not limited to PostgreSQL and MySQL.
To commence development with BrandalBase, adherence to the following procedural steps is requisite:
- Installation of Dependencies It is imperative to confirm the presence of a Python installation. Subsequent to this verification, all requisite project dependencies must be installed via pip:
pip install -r requirements.txt
- Database Configuration The exemplary database configuration file should be replicated:
cp config/database.example.json config/database.json
Proceed to open config/database.json and meticulously adjust the database connection parameters to align with the specific requirements of your chosen database system (e.g., PostgreSQL or MySQL).
- Model Definition The exemplary model definition file should be replicated:
cp config/models.example.json config/models.json
Define the application's data models in a structured JSON format within the config/models.json file.
- Execution of Database Migrations Upon the comprehensive definition of your models, the database migration process must be initiated to establish or update the database schema:
alembic upgrade head
- Application Execution Finally, the BrandalBase application is to be launched utilizing Uvicorn:
uvicorn app.main:app --reload
The application will typically operate on http://127.0.0.1:8000 (as per default configuration), at which point the defined APIs will become accessible.
Contributions from the open-source community are highly valued and actively encouraged. Prospective contributors are requested to adhere to the following guidelines:
- Fork this repository.
- Establish a new branch (git checkout -b feature/new-feature-name).
- Implement the desired modifications.
- Commit the alterations (git commit -m 'Add new feature').
- Push the changes to your designated branch (git push origin feature/new-feature-name).
- Initiate a Pull Request.
This project operates under the provisions of the MIT License. Comprehensive details regarding the terms and conditions are available for review within the LICENSE.md file.