BlueSphereAI FastAPI-PostgreSQL-Alembic-Docker .cursorrules file for Python

# Rules
Apply the following rules to the codebase

## Module installation rules
- Insall necessary python modules for generated code on your own using poetry instead of pip.
- Especially for EmailStr, install pydantic[email].

## Type expression rules
- Do not use call expressions like constr() for type annotations. Instead, use the type annotation directly.

## Import rules
- Do not use relative imports. Instead, use absolute imports.
- Import necessary python modules for generated code.
- Import db dependencies from app.dependencies.database instead of app.dependencies.db.

## Database rules
- Create a new directory for each database model in app/database directory with __init__.py, model.py and service.py.
- New model should be derived from BaseModel and new service should be derived from BaseService. Never miss table=True at the model class definition.
- After every change in database, update __init__.py file in app/database directory to include all the models except for the base model. Then, execute "make initialMigration" to create the initial migration. After that, execute "make applyMigration" to apply the migration on your own. Before executing these commands, make sure to be in the backend directory.
dockerfile
express.js
makefile
mako
python
shell

First Time Repository

Python

Languages:

Dockerfile: 0.8KB
Makefile: 0.8KB
Mako: 0.6KB
Python: 7.5KB
Shell: 0.2KB
Created: 1/6/2025
Updated: 1/8/2025

All Repositories (1)