Subir archivos a ''

main
José María Ávila 1 year ago
parent d5352ca053
commit 6923285bfc

@ -1,42 +1,42 @@
# WOD API - Words Of Domain API
WOD API is a quick and simple API to get words of a domain name.
## Key features
* Purely Python
* It's an API with only 1 endpoint
* Needs flask library
* Needs wordsegment library
## Requirements
WOD API requires **flask** and **wordsegment** Python libraries:
* pip install flask
* pip install wordsegment
## Usage
- Run: python .\wodapi.py
- Then, a server is deploy on http://127.0.0.1:5000
- Use GET in endpoing domain: http://127.0.0.1:5000/domain/hereyourdomainname
## Documentation
This is the README file
## Authors
* Bichi - José Mª Ávila
* Antonio Villamarin
## License
This is a NIDOMA development
## Links
- https://grantjenks.com/docs/wordsegment/
- https://pypi.org/project/wordsegment/
# WOD API - Words Of Domain API
WOD API is a quick and simple API to get words of a domain name.
## Key features
* Purely Python
* It's an API with only 1 endpoint
* Needs flask library
* Needs wordsegment library
## Requirements
WOD API requires **flask** and **wordsegment** Python libraries:
* pip install flask
* pip install wordsegment
## Usage
- Run: python .\wodapi.py
- Then, a server is deploy on http://127.0.0.1:5000
- Use GET in endpoing domain: http://127.0.0.1:5000/domain/hereyourdomainname
## Documentation
This is the README file
## Authors
* Bichi - José Mª Ávila
* Antonio Villamarin
## License
This is a NIDOMA development
## Links
- https://grantjenks.com/docs/wordsegment/
- https://pypi.org/project/wordsegment/
- https://blog.stoplight.io/python-rest-api

@ -0,0 +1,13 @@
import wordsegment
from wordsegment import load, segment
from flask import Flask, json, request
load()
api = Flask(__name__)
@api.route('/domain/<string:name>', methods=['GET'])
def get_words(name: str):
return json.dumps(segment(name))
if __name__ == '__main__':
api.run()
Loading…
Cancel
Save