Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wieczorek1990/rssscrapper
https://github.com/wieczorek1990/rssscrapper
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wieczorek1990/rssscrapper
- Owner: wieczorek1990
- Created: 2018-10-26T12:43:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T14:19:58.000Z (almost 6 years ago)
- Last Synced: 2024-11-24T15:16:22.359Z (2 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
rssscrapper
===========Currencies scrapper challenge.
Time spent: 6h
# How to test
Assuming you have fish shell and httpie installed.
If not: `sudo apt install -y fish httpie`.```
cd rssscapper
python3 manage.py currency usd
python3 manage.py currency usd pln
./run.fish
http --follow localhost:8000/api/currencies/
python3 manage.py shell
>>> from api.models import ExchangeRate
>>> ExchangeRate.objects.all()
USD: 1.15>]>
```or use Docker:
```
docker-compose up
set did (docker ps | grep rssscrapper_django | tr -s ' ' | cut -f 1 -d ' ')
docker exec -it $did python3 rssscrapper/manage.py currency usd
docker exec -it $did python3 rssscrapper/manage.py currency usd pln
http --follow localhost/api/currencies/
docker exec -it $did python3 manage.py shell
>>> from api.models import ExchangeRate
>>> ExchangeRate.objects.all()
USD: 1.15>]>
```# Architecture
Django --> DRF --> list route /api/currencies/
|
--> command to fetch currencies (currency)
# Issued commands
```
django-admin startproject rssscrapper
python3 manage.py startapp api
python3 manage.py makemigrations
python3 manage.py createsuperuser
```