This is an address book application built using the FastAPI framework. It provides APIs to create, update, delete, and retrieve addresses. The addresses contain coordinates and are saved to an SQLite database. User can also retrieve addresses within a given distance from specific location coordinates. This application uses SQLAlchemy ORM for database interactions and provides a standardized response structure.
- Clone the repository
git clone https://github.com/sndp-s/fastapi_addressbook.git
cd fastapi_addressbook
- Create a Virtual Environment
python -m venv .venv
source venv/bin/activate
- Install Dependencies
pip install -r requirements.txt
- Create the '.env' file Create a file named .env in the root directory of your project and add the following initial values:
app_name="fastapi_addressbook_api"
author_name="Sandeep Sharma"
author_email="[email protected]"
database_connection_url="sqlite:///addressbook.sqlite3"
- Run the Application
uvicorn main:app --reload
- Access the API Documentation Open your browser and go to http://127.0.0.1:8000/docs to access the Swagger UI for API documentation and testing.
This project is licensed under the fastapi_addressbook License. For more details, see the LICENSE file.