Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skecskes/starwarsapi
an Api which provides some Star Wars data
https://github.com/skecskes/starwarsapi
Last synced: 3 days ago
JSON representation
an Api which provides some Star Wars data
- Host: GitHub
- URL: https://github.com/skecskes/starwarsapi
- Owner: skecskes
- Created: 2023-11-02T22:34:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-02T22:37:20.000Z (about 1 year ago)
- Last Synced: 2024-05-02T02:59:26.619Z (7 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Star Wars API
## Task
I’d like you to create an API which provides ordered information on various entities from the Star Wars films by their statistics.
For the purpose of this task, you will use [SWAPI](https://swapi.dev/), a public Star Wars REST API.
Service should present an API which:
- Surfaces a list of starships sorted by name
- Allow the sort order to be ascending or descending
- Allow the sort key to be changed (e.g. sort by length or cost rather than name)## Local dev
Create project specific environment for dependencies
python3 -m venv .venv
Activate project libraries:
source .venv/bin/activate
Install all project dependencies:
pip install -r requirements.txt
Run the app
uvicorn src.main:app --reload
***Swagger available at http://127.0.0.1:8000/docs#/***