Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diptangsu/finland-api
API for FinLand android app made using Flask. HackerEarth BTS Hackathon
https://github.com/diptangsu/finland-api
api flask hackathon hackerearth python python36 rest-api
Last synced: about 21 hours ago
JSON representation
API for FinLand android app made using Flask. HackerEarth BTS Hackathon
- Host: GitHub
- URL: https://github.com/diptangsu/finland-api
- Owner: diptangsu
- Created: 2018-11-16T07:15:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T04:29:51.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T17:13:14.929Z (over 1 year ago)
- Topics: api, flask, hackathon, hackerearth, python, python36, rest-api
- Language: Python
- Size: 56.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FinLand-API
API for [FinLand android app](https://github.com/morninigstar/FinLand) made using [Flask](http://flask.pocoo.org/). HackerEarth [BTS Hackathon](https://www.hackerearth.com/sprints/bts-global-hackathon-asia/)The entire project is [here](https://github.com/tmoynandy/FinLand-BTS18).
# Setup
Make sure you have `python3.6` installed in your machine before you continue. For windows users, the path to `python3.6` must be added to the system environment variable `PATH`.
Install virtualenv in python. `pip3 install virtualenv`## Create a virtual environment
### Linux
```bash
$ virtualenv -p python3 venv
```
This will create a virtual environment named `venv` with `python3` as its interpreter.## Windows
If you have multiple versions of python installed and added to `PATH`, find out the path for `python3.6`.
```cmd
> where python
C:\Python27\python.exe
C:\Users\deepd\AppData\Local\Programs\Python\Python37-32\python.exe
C:\Users\deepd\AppData\Local\Programs\Python\Python36\python.exe
```
You will get an output of all the python execuables that are added to `PATH`. For example I have `python2.7`, `python3.6` and `python3.7` installed.Use the path of `python3.6` to create the virtual environment.
```cmd
> virtualenv -p C:\Users\deepd\AppData\Local\Programs\Python\Python36\python.exe venv
```## Activating the virtualenv
### Linux
```bash
$ source venv/bin/activate
(venv) ...$
```
### Windows
```cmd
> venv\Scripts\activate
(venv) ...>
```## Installing requirements
You can either install requirements from the [requirements.txt](/requirements.txt) file but using the command
```
pip install -r requirements.txt
```## Running the API
Run the [api.py](/api.py) file to start the API server.
```
python api.py
```## API Response Exmples
On success
```javascript
{
land-type: "Herbaceous Vegetation",
probability: 79.46,
status: "success",
status-code: 1,
time-taken: 1.6259400844573975
}
```
On failure
```javascript
{
land-type: null,
probability: null,
status: "failure",
status-code: 0,
time-taken: -1
}
```## Team c_of_pythons
1. [Diptangsu Goswami](https://github.com/diptangsu)
2. [Tanumoy Nandi](https://github.com/tmoynandy)
3. [Sujoy Dutta](https://github.com/Sujoydatta26)
4. [Koustav Chanda](https://github.com/KoustavCode)