Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/narhen/python-api-search
An experimental search API for NDLA
https://github.com/narhen/python-api-search
dockerfile falcon ndla pypy python requests search
Last synced: about 23 hours ago
JSON representation
An experimental search API for NDLA
- Host: GitHub
- URL: https://github.com/narhen/python-api-search
- Owner: narhen
- Created: 2017-06-22T16:21:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T23:58:07.000Z (about 2 years ago)
- Last Synced: 2023-03-12T06:48:28.439Z (almost 2 years ago)
- Topics: dockerfile, falcon, ndla, pypy, python, requests, search
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-api-search
## How to run
Run API server
```bash
$ pip install virtualenv
$ virtualenv apisrc
$ source apisrc/bin/activate
$ pip install -r requirements.txt
$ ARTICLE_API_URL=http://0:30002 gunicorn --chdir api-search/ --reload -b :1234 main:app
```In another terminal
```bash
$ curl 0:1234
```## Examples
`GET /?query=norge&page-size=2`
```json
[
{
"type": "articles",
"results": [
{
"introduction": "Innovasjon Norge har ansvar for gjennomføringen...",
"id": "14074",
"title": "Innovasjon Norge"
},
{
"introduction": "Trykk på lenkene under her for å lese om ...",
"id": "15617",
"title": "Filmutdanning i Norge"
}
]
},
{
"type": "learningpaths",
"results": [
{
"introduction": "Etter at du har fullført denne læringsstien, ...",
"id": 56,
"title": "Samfunnsforhold og statsutvikling, 700-1500"
},
{
"introduction": "Når du har gjennomført ...",
"id": 2,
"title": "Historia og fortellingene om Norge"
}
]
}
]```