Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scanapi/demo-api
This repo is only for demo purposes
https://github.com/scanapi/demo-api
api demo demo-api django django-rest-framework scanapi
Last synced: about 2 months ago
JSON representation
This repo is only for demo purposes
- Host: GitHub
- URL: https://github.com/scanapi/demo-api
- Owner: scanapi
- License: mit
- Created: 2019-12-12T23:19:44.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T03:31:32.000Z (9 months ago)
- Last Synced: 2024-04-14T07:10:15.983Z (8 months ago)
- Topics: api, demo, demo-api, django, django-rest-framework, scanapi
- Language: Python
- Homepage: https://demo.scanapi.dev/
- Size: 1.26 MB
- Stars: 2
- Watchers: 15
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![](https://github.com/scanapi/design/raw/main/images/github-hero-dark.png)
# Demo API
This is an API built only for demo purposes of [ScanAPI](https://github.com/camilamaia/scanapi). It
can be accessed at https://demo.scanapi.dev/.## Development
### How to run demo-api locally
> The setup process's prerequisites are [Python 3.6+](https://www.python.org/downloads/), [pip](https://pip.pypa.io/en/stable/installing/) and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) installed in your system.
1. **Fork scanapi/demo-api**
* [Fork](https://docs.github.com/en/github/getting-started-with-github/quickstart/fork-a-repo) a repo in your github account such as you get *yourusername*/demo-api. Now that you own a copy of the repo, you can easily clone the repo with the command below so that you can start making changes to the repo.
```
git clone https://github.com//demo-api.git
```2. **Create and activate a new virtual environment**
* For creating virtual environment we are using the method mentioned in the [Python documentation](https://docs.python.org/3/tutorial/venv.html).
```
python3 -m venv DemoAPI
source DemoAPI/bin/activate
```* Feel free to use any other library like [virtualenv](https://virtualenv.pypa.io/en/latest/) or [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) for creating a new environment if you have any other prefrences.
3. **Install the demo-api dependencies**
```
cd demo-api
pip install -r requirements.txt
```4. **Make migrations and run the demo-api**
```
python manage.py migrate
python manage.py runserver
```* If everything runs smoothly without any errors you should see the API live at http://127.0.0.1:8000/. Feel free to create an issue if run into problems while setting up the project.
## Deployment
Currently the demo-api is hosted on Fly.io. Whenever any branch is merged into the main branch a new deployment is triggered at [demo.scanapi.dev](https://demo.scanapi.dev/api/v1/) via GitHub Actions
You can check the status/activity log of the current deployment as well as the past ones [here](https://github.com/scanapi/demo-api/actions/).