Skip to content

This project is an Accounting API built with FastAPI. It provides endpoints for managing jobs, transactions, revisions, and sealed manifests.

Notifications You must be signed in to change notification settings

bantoinese83/accounting-api

Repository files navigation

Accounting API 💼

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.

✨ Key Features

  • 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.

🚀 Technologies

Python 3.8+

FastAPI

SQLModel

SQLite

Kafka

Pytest

Locust

🛠️ Installation

  1. Prerequisites:

    • Python 3.8+
    • Kafka
    • Zookeeper (for Kafka)
  2. Clone:

   git clone https://github.com/bantoinese83/accounting-api.git
   cd accounting-api

Install Dependencies

pip install -r requirements.txt

Set Environment Variables

python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

Start Zookeeper and Kafka

./start_services.sh

Run the Application

uvicorn app.main:app --reload

Run Tests

pytest

Run Locust

locust -f locustfile.py

Configuration

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.

API Endpoints

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.

📊 GitHub Profile Insights

🚀 My GitHub Stats

GitHub Stats


💻 Top Languages

Top Languages


🌟 Contribution Graph

Contribution Graph


🏆 GitHub Achievements

GitHub Achievements


🐙 Streak Stats

GitHub Streak Stats


Feel free to explore my repositories and projects to see what I've been working on. 🚀

About

This project is an Accounting API built with FastAPI. It provides endpoints for managing jobs, transactions, revisions, and sealed manifests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published