https://github.com/troyan-dy/secret-transferring-service
service for transferring secrets over http on FastAPI. Ready for heroku
https://github.com/troyan-dy/secret-transferring-service
Last synced: about 1 month ago
JSON representation
service for transferring secrets over http on FastAPI. Ready for heroku
- Host: GitHub
- URL: https://github.com/troyan-dy/secret-transferring-service
- Owner: troyan-dy
- License: mit
- Created: 2021-03-20T17:56:03.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T08:50:27.000Z (about 4 years ago)
- Last Synced: 2025-02-05T10:50:37.588Z (3 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# secret transferring service
Service for transferring secrets over http on FastAPIReady for heroku
## Dependencies
- docker-compose
- python 3.9## Commands
### Install
- `make install`### Run tests
- `make test`
### Linting
- `make lint`### Formatting
- `make format`### Start in docker
- `make start`
- `make stop`## Usage
### Create secret
- Curl
```bash
curl -X 'POST' \
'http://0.0.0.0:5000/create_secret' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"expire": 10000,
"message": "some message",
"password": "01234"
}'
```
- Response body
```json
{
"expire": 10000,
"token": "116cf556-3d80-4e19-ba2c-5d6dd8008a00"
}
```
### Check secret
- Curl
```bash
curl -X 'POST' \
'http://0.0.0.0:5000/check_secret/116cf556-3d80-4e19-ba2c-5d6dd8008a00' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"password": "01234"
}'
```- Response body
```json
{
"message": "some message",
"success": true
}
```