https://github.com/wanderindev/hr-rest-api
RESTful API for Human Resources Database
https://github.com/wanderindev/hr-rest-api
flask flask-jwt flask-restful flask-sqlalchemy postgresql unittest
Last synced: 4 months ago
JSON representation
RESTful API for Human Resources Database
- Host: GitHub
- URL: https://github.com/wanderindev/hr-rest-api
- Owner: wanderindev
- License: mit
- Created: 2017-12-06T04:53:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T20:35:24.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T21:46:10.727Z (4 months ago)
- Topics: flask, flask-jwt, flask-restful, flask-sqlalchemy, postgresql, unittest
- Language: Python
- Homepage:
- Size: 443 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - wanderindev/hr-rest-api - RESTful API for Human Resources Database (Python)
README
RESTful API for our Human Resources Database 🕘 - 🕔
>RESTful API for performing CRUD operations in our Human Resources database. The API was coded in Python
using Flask, Flask-RESTful, SQLAlchemy, and Flask-JWT. For testing, I used UnitTest.## How to use in development
Clone the repository:
```sh
git clone https://github.com/wanderindev/hr-rest-api.git
cd hr-rest-api
```
Start the application with docker-compose:
```sh
docker-compose up --build
```
This will create a database container, a RESTful API container, a backend network, and a volume
mapping the ./rest directory in the repository with the working directory in the container.## Running tests
From PyCharm, right-click in the `tests/system` or `tests/unit` directory and select
"Run tests with Coverage" to run either system or unit tests.## Testing with Postman
Clone the [postman-hr-rest-api](https://github.com/wanderindev/postman-hr-rest-api)
repository:
```sh
git clone https://github.com/wanderindev/postman-hr-rest-api.git
```
Open Postman and import `hr-rest-api.json` and `hr-rest-api-environment.json`.Click on Runner.
In the window that pops open, select the `hr-rest-api` collection and the `hr-rest-api`
environment.Click on Run.
## Deployment
Modify `rest/Dockerfile_prod`, adding the correct values for the environment variables.Build the container image and push to Docker Hub:
```sh
cd rest
docker build -t wanderindev/hr-rest -f Dockerfile_prod .
docker push wanderindev/hr-rest
```
Go to the [do-managed-kubernetes](https://github.com/wanderindev/do-managed-kubernetes)
repository and re-deploy the pod.
```sh
kubectl delete deployment hr-rest
kubectl apply -f ./sites/hr-rest.yml
```## Author
👤 **Javier Feliu**
* Twitter: [@JavierFeliuA](https://twitter.com/JavierFeliuA)
* Github: [@wanderindev](https://github.com/wanderindev)## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2019 [Javier Feliu](https://github.com/wanderindev).
This project is [MIT](https://github.com/wanderindev/hr-rest-api/blob/master/LICENSE.md) licensed.
***
_I based this README on a template generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_