https://github.com/jsonzilla/download_server_control
API for management of control versioning applications
https://github.com/jsonzilla/download_server_control
fastapi python versioning
Last synced: 12 months ago
JSON representation
API for management of control versioning applications
- Host: GitHub
- URL: https://github.com/jsonzilla/download_server_control
- Owner: jsonzilla
- License: other
- Created: 2022-04-25T23:19:10.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-11T20:01:27.000Z (over 3 years ago)
- Last Synced: 2025-01-27T05:51:49.918Z (about 1 year ago)
- Topics: fastapi, python, versioning
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Download Server Control
Control user access to your application or any versioned file/link.
## License
This project is licensed under the terms of the Apache license.
# Install the requirements:
A mongo database is required to run the server.
Get one from [MongoDB Atlas](https://www.mongodb.com/cloud/atlas), for free.
```bash
pip install -r requirements.txt
```
## Run
```bash
uvicorn app.main:app --reload
```
## Test
```bash
python -m pytest -W ignore::DeprecationWarning
pytest --cov=app --cov-report=html
python -m pytest_watch
```
## [Config .env](https://fastapi.tiangolo.com/advanced/settings/#reading-a-env-file)
Configure the location of your MongoDB database in a .env file:
```
MONGO_URL="mongodb+srv://:@/?retryWrites=true&w=majority"
BUCKET_NAME="configzero-jsonzilla"
```
Need to create a user at database to run the server:
```
mongo --eval "db.users({username: '', password: '', email: ''});"
```
## Swagger
To see the Swagger documentation, visit:
http://localhost:8000/docs
## Documentation of libraries
To see the documentation, visit:
* [FastAPI](https://fastapi.tiangolo.com/)
* [MongoDB](https://www.mongodb.com/)
* [MongoDB Atlas](https://www.mongodb.com/cloud/atlas)
* [Pydantic](https://pydantic-docs.helpmanual.io/)
## WIP
* Automated tests
* S3 is not yet implemented.
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html