Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lehiboumt/financepython
Python API for finance done with fast API and PostgreSQL, SQLAlchemy as the ORM and Pydantic for schema validation
https://github.com/lehiboumt/financepython
Last synced: about 2 months ago
JSON representation
Python API for finance done with fast API and PostgreSQL, SQLAlchemy as the ORM and Pydantic for schema validation
- Host: GitHub
- URL: https://github.com/lehiboumt/financepython
- Owner: LeHibouMT
- License: mit
- Created: 2024-11-27T02:56:59.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T03:09:11.000Z (about 2 months ago)
- Last Synced: 2024-11-27T04:20:21.245Z (about 2 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# installation
install Python, version 3.12.6
install PostgreSQL 16.4 with PgBouncer, PgAdmin and PgAgent
navigate to the project folder
create VM: python -m venv env
activate VM: .\env\Scripts\activate
deactive VM: deactivate
install requirements: pip install -r requirements.txt# run and test
run the application: uvicorn app.main:app --reload
test a route with the swagger from fastAPI: http://127.0.0.1:8000/docs
example on how to use a curl to test a route:
- for CMD: curl -X GET "http://127.0.0.1:8000/items/0"
- for powershell: curl.exe -X GET "http://127.0.0.1:8000/items/0"# database
use PgAdmin to manage the database
create a new database: CREATE DATABASE mydatabase;
create a new user: CREATE USER myuser WITH PASSWORD 'mypassword';
grant privileges: GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser;