Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nubilfi/restful-trends
A RESTful API to get Trends data from Google, TikTok, YouTube and Twitter
https://github.com/nubilfi/restful-trends
api backend fastapi google python restful-api tiktok trends twitter youtube
Last synced: about 3 hours ago
JSON representation
A RESTful API to get Trends data from Google, TikTok, YouTube and Twitter
- Host: GitHub
- URL: https://github.com/nubilfi/restful-trends
- Owner: nubilfi
- License: mit
- Created: 2023-10-16T03:25:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-16T03:32:01.000Z (about 1 year ago)
- Last Synced: 2024-01-29T21:36:22.819Z (10 months ago)
- Topics: api, backend, fastapi, google, python, restful-api, tiktok, trends, twitter, youtube
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RESTful Trends App
This app contains several online Trends data.
## Setup
Setup your service environment by change the `.env.example` file to `.env` file and its content. Activate your python environment then install all the dependencies by command:
```bashsession
pip install -r requirement.txt
```Then navigate to `app/cors.py` file to change `allowed_domains` list in case you want to use this application on your production server. Also you need to change _basic authentication account_ in `app/utils.py` file.
The default `allowed_domain` list is:
- example1.com
- example2.comThe default of _basic authentication account_ is:
- username: changeme
- password: changemeIf you want to use _Google Trend AI Worker_, you need to change the `default prompt` which defined in [utils.py](https://github.com/nubilfi/restful-trends/blob/2026ff235c507056a85b65988ffb8b12189701ff/app/utils.py#L72) file.
## Usage
If you're in `development` environment, run the app by the following command:
```bashsession
uvicorn main:app --reload
```But if you're in `production` mode, please run the following command instead:
```bashsession
sh start.sh
```### Access
After the application is run, you can check the `available endpoints` on `/docs`, for example: `http://localhost:8000/docs`
## Docker
On progress..
## Todo
- [ ] Twitter trends data
## Completed ✓
- [x] Google trends data
- [x] TikTok trends data
- [x] YouTube trends data