remmover / test_task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Certainly! Here's a README.md file based on the provided information, created from scratch:

HTTP Service for Database Interaction

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.

Table of Contents

Introduction

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.

Features

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

Prerequisites

Before getting started, ensure you have the following prerequisites:

Installation

Follow these steps to set up the project:

  1. Clone the repository:

    git clone https://github.com/remmover/test_task

.git


2. Navigate to the project directory:

```bash
cd test_task
  1. Install project dependencies using Poetry:

    poetry install

Usage

To use the application:

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

API Endpoints

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

Documentation

For detailed documentation, visit Documentation. The documentation is generated using Sphinx.

Testing

To run unit tests, use the following command:

python -m unittest discover tests

Deployment

Deploy the FastAPI application to a production server. Ensure that you have the necessary server requirements and configurations in place.

Contributing

If you would like to contribute to this project, please follow our Contribution Guidelines.

License

This project is licensed under the [License Name] License. See the LICENSE.md file for details.

Acknowledgments

We acknowledge the contributions of the open-source community and the libraries/tools that made this project possible.

About

License:MIT License


Languages

Language:Visual Basic 6.0 89.1%Language:Python 10.6%Language:PLSQL 0.2%Language:Mako 0.2%