Demo set up to work with in memory database
ArticlesREST API is a FastAPI-based service for managing articles with details like name, tags, dates, category, and more. This demonstration version operates on an in-memory database, making it easy to test and experiment with the API.
Samle get articles response
- CRUD operations for Articles
- Auto-generated documentation with OpenAPI and Swagger UI
- In-memory database for demonstration purposes
To run the application locally, follow these steps:
pip install -r requirements.txt;\
uvicorn main:app --reload
-
Clone the repository:
git clone git@github.com:Kotmin/ArticlesREST.git cd ArticlesREST
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Start the FastAPI application:
uvicorn main:app --reload
-
Access the API documentation:
- Swagger UI: http://127.0.0.1:8000/docs
- OpenAPI YAML: http://127.0.0.1:8000/openapi.yaml
- OpenAPI JSON: http://127.0.0.1:8000/openapi.json
To run the application using Docker, follow these steps:
-
Clone the repository:
git clone git@github.com:Kotmin/ArticlesREST.git cd ArticlesREST
-
Build the Docker image:
docker build -t articlesrest .
-
Run the Docker container:
docker run -d -p 8000:8000 articlesrest
-
Access the API documentation:
- Swagger UI: http://127.0.0.1:8000/docs
- OpenAPI YAML: http://127.0.0.1:8000/openapi.yaml
- OpenAPI JSON: http://127.0.0.1:8000/openapi.json
The API documentation is auto-generated and can be accessed via Swagger UI at http://127.0.0.1:8000/docs. The OpenAPI specification is also available in YAML format at http://127.0.0.1:8000/openapi.yaml. You can also access JSON fortmat at http://127.0.0.1:8000/openapi.json.
Contributions are welcome! Please fork the repository and submit pull requests for any enhancements, bug fixes, or documentation improvements.
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature
) - Create a new Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.