Ever wanted to play FF7 ... one of the greatest games of all time ... as a REST API?!
Warning
This API is still in development. You have been warned.
GET /saves
[
{
"id": "1400602a-516f-449c-84f6-b22c9a0d28e3",
"location": "mideel",
"party": [
"Cloud",
"Cid",
"Cait Sith"
],
"party_lead": {
"level": 77,
"name": "Cloud"
}
}
]
- create & manage your party of up to 3 characters
- create & manage your save files, storing key info on your party & location
- read tips and info on bosses
assign materia to party members> unfortunately this is WIP, as it was impacted by recent changes- read all in-game materia, filtering by type (e.g
magic), element (e.gfire) and sort (asc/desc)
- full in-game enemy details
- improved db relationships between Party members, Materia & Save States
- wild encounters to fight enemies and gain XP/AP/Gil
- link party members with materia, equipment
- display party member stats
Note
If you have any ideas or feedback, please create an Issue or start a Discussion. Cheers!
- run
sh docker-local-container.shto build and run a container (port 80) - target
0.0.0.0:80for any local tests and debugging - open
{url}:{port}/swagger-uifor api docs
Tip
Use a virtual python env to isolate your workspace.
python3 -m venv .venv(or rename.venvto whatever you like)source .venv/bin/activatepip install -r requirements- run
sh migrations-run-local.shto prep your db - start server using
gunicorn --bind 0.0.0.0:7777 "app:create_app()" - jump to
localhost:80/swagger-uifor api docs
From ./:
- run
coverage run -m pytest - run
coverage html - open
htmlcov/index.htmlto view report
Tip
To print logs within unit tests, append -s to the coverage command in step 1 above. Useful when debugging unit tests.
- Python 3.12.3
- Web framework: Flask (https://flask.palletsprojects.com/en/stable/), gunicorn
- OpenAPI docs: flask-smorest (https://flask-smorest.readthedocs.io/en/latest/openapi.html)
- ORM: SQLAlchemy (https://www.sqlalchemy.org/) + Flask-SQLAlchemy (https://flask-sqlalchemy.readthedocs.io/en/stable/)
- DB: sqlite for local, postgres for prod
- API client: Bruno (https://www.usebruno.com/)
- unit tests: pytest + (https://coverage.readthedocs.io/en/7.8.0/)
- custom README badges: https://smarie.github.io/python-genbadge/