This robust API, built with FastAPI, provides comprehensive endpoints for managing accounting data, including jobs, transactions, revisions, and sealed manifests. It leverages a modern tech stack including SQLModel, SQLite, Kafka, and robust testing with Pytest and Locust.
- Job Management: Create, retrieve, and manage job records.
- Transaction Handling: Create, list, revise, and seal financial transactions.
- Revision Tracking: Maintain a complete audit trail of transaction revisions with detailed reasons.
- Data Integrity: Securely seal transactions with checksum verification.
- Asynchronous Communication: Utilizes Kafka for reliable and scalable event streaming.
- Thorough Testing: Includes comprehensive test suites using Pytest and performance testing with Locust.
-
Prerequisites:
- Python 3.8+
- Kafka
- Zookeeper (for Kafka)
-
Clone:
git clone https://github.com/bantoinese83/accounting-api.git
cd accounting-api
pip install -r requirements.txt
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
./start_services.sh
uvicorn app.main:app --reload
pytest
locust -f locustfile.py
Configuration settings are managed in config.py
. The default database is SQLite, but you can change the DATABASE_URL
environment variable to use a different database.
Endpoint | Method | Description |
---|---|---|
/v1/jobs/create |
POST |
Create a new job record. |
/v1/jobs/list |
GET |
List all job records. |
/v1/transactions/create |
POST |
Create a new transaction. |
/v1/transactions/list |
GET |
List all transactions. |
/v1/transactions/{transaction_id}/revise |
POST |
Revise an existing transaction. |
/v1/transactions/seal |
POST |
Seal transactions for data integrity. |
/v1/revisions/list |
GET |
List all transaction revisions. |
Feel free to explore my repositories and projects to see what I've been working on. 🚀