Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matheussc017/addresscoordinatesapi
This API was developed with the specific intention of serving as a microservice within another project in my portfolio. In order to calculate the distance between points.
https://github.com/matheussc017/addresscoordinatesapi
flask google-maps-api mongodb python rest-api swagger
Last synced: 7 days ago
JSON representation
This API was developed with the specific intention of serving as a microservice within another project in my portfolio. In order to calculate the distance between points.
- Host: GitHub
- URL: https://github.com/matheussc017/addresscoordinatesapi
- Owner: MatheusSC017
- License: mit
- Created: 2023-11-29T20:59:48.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-23T10:17:06.000Z (9 months ago)
- Last Synced: 2024-02-23T11:29:33.442Z (9 months ago)
- Topics: flask, google-maps-api, mongodb, python, rest-api, swagger
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Address Coordinates API
![Linguagem mais usada](https://img.shields.io/github/languages/top/MatheusSC017/AddressCoordinatesAPI)
![Numero de lingaugens usadas](https://img.shields.io/github/languages/count/MatheusSC017/AddressCoordinatesAPI)
![Lincense](https://img.shields.io/github/license/MatheusSC017/AddressCoordinatesAPI)
![Tamanho do projeto](https://img.shields.io/github/languages/code-size/MatheusSC017/AddressCoordinatesAPI)This API has been developed with the specific intent of serving as a microservice within another project featured in my portfolio.
## Technologies
Key technologies employed in the construction of this API include:- Flask
- PyJWT
- Pymongo (MongoDB)
- Dotenv## Documentation
Regarding the available endpoints, you can view them in the Swagger documentation at this [link](https://address-coordinates-cd0a1a6282b5.herokuapp.com/v1/ui/)## Requirements
To run this project, make sure you have the below software installed on your device
- Python >= 3.10## Installation
### On-premises installation
1. Clone the repository on your device2. Go to the repository of the cloned project on your device
3. Create a virtual environment on your device and activate it (command for linux OS)
> python -m venv venv
>
> . venv/bin/activate4. Install the libraries saved in the requirements.txt file, if you are using the PIP package manager you can use the following command
> pip install -r requirements.txt5. The last step is to define the settings, for this create a file named **.env** and define the parameters below
~~~
SECRET_KEY = ''
MONGO_URI = ''
GOOGLE_MAPS_SECRET_KEY = ''
~~~The purpose of each parameter is described below
* SECRET_KEY: This parameter defines a key for the project used for the purpose of creating and validating tokens for project users
* MONGO_URI: Information for connecting mongoDB dataset, you can use your local mongoDB through [compass](https://www.mongodb.com/products/tools/compass) or you can use [online service](https://www.mongodb.com/online)
* GOOGLE_MAPS_SECRET_KEY: Secret key to connect to Google's geocoding service, to create the key access this [link](https://developers.google.com/maps/documentation/geocoding/?hl=pt_BR)6. The final step is to run the application, to do this run the command below:
> flask --app address run## Obtaining an API Key Token
To get an API key token, run the ApiKey.py file and enter the name you want to use as identification, it will print the JWT token at the prompt that you can use