Certainly! Here's a README.md file based on the provided information, created from scratch:
This project implements an HTTP service for interacting with a database using Python. It provides a JSON API service to perform various database operations. The project uses FastAPI, SQLAlchemy, Poetry for dependency management, Sphinx for documentation, and unittests for testing.
- Introduction
- Features
- Prerequisites
- Installation
- Usage
- Documentation
- Testing
- Deployment
- Contributing
- License
- Acknowledgments
This project aims to create an HTTP service that interacts with a database. It offers a JSON API to perform operations on the database. It utilizes FastAPI for building the API, SQLAlchemy for database operations, Poetry for dependency management, Sphinx for documentation, and unittests for testing.
- User Credits Information: Retrieve information about a user's credits, including issuance date, closed status, return date, issuance amount, accrued interest, and payment details.
- Upload Plans: Upload Excel files containing plans for the next month, ensuring data integrity and preventing duplicates.
Before getting started, ensure you have the following prerequisites:
- Python 3.x
- Poetry
Follow these steps to set up the project:
-
Clone the repository:
git clone https://github.com/remmover/test_task
.git
2. Navigate to the project directory:
```bash
cd test_task
-
Install project dependencies using Poetry:
poetry install
To use the application:
You can run the application using Uvicorn:
uvicorn your_app_module:app --host 0.0.0.0 --port 8000 --reload
Replace your_app_module
with the actual module name containing your FastAPI app.
-
/user_credits/{user_id}: Retrieve information about a user's credits.
Example:
GET /user_credits/123
-
/plans_insert: Upload plans for the next month.
Example:
POST /plans_insert
For detailed documentation, visit Documentation. The documentation is generated using Sphinx.
To run unit tests, use the following command:
python -m unittest discover tests
Deploy the FastAPI application to a production server. Ensure that you have the necessary server requirements and configurations in place.
If you would like to contribute to this project, please follow our Contribution Guidelines.
This project is licensed under the [License Name] License. See the LICENSE.md file for details.
We acknowledge the contributions of the open-source community and the libraries/tools that made this project possible.