- Notifications
You must be signed in to change notification settings - Fork4
gntouts/eltrak
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Heroku Free tier is now terminated, so the app is no longer publicly available. All links in the README using thehttps://eltrak.herokuapp.com
URL are invalid. I will try to host it somewhere else soon. In the meantime, you can easily deployeltrak
yourself. Sorry for the inconvenience.
eltrak intends to become a free to use API to get shipping status for Greek courier services.
Currently, it supportsACS, Elta, Geniki Taxydromiki, Speedex Courier, Skroutz Last Mile and EasyMail Courier. Due to lack of tracking numbers in a variety of states to test with, some errors are to be expected.
Geniki Taxidromiki is causing Internal Server Errors due to Amazon Cloudfront blocking access from Heroku dynos. Trying to find a proxy solution.
Other Greek courier services will follow, if I can find more tracking codes.
Simply, perform a GET request to the following URL:
https://eltrak.herokuapp.com/v2/track/[COURIER]/[TRACKINGNUMBER]
For example in Python:
importrequestsres=requests.get('https://eltrak.herokuapp.com/v1/track/speedex/010011110101')print(res.json())
Or if you don't know which courier has issued the tracking number you can use the following URL:
https://eltrak.herokuapp.com/v2/track-all/[TRACKINGNUMBER]
Pull the Docker image and start the container:
docker pull gntouts/eltrak:latestdocker run -d -p 8888:80 eltrak:latest
In order to run the server locally (or anywhere else) run the following commands:
Clone the repository and change directory:
git clone https://github.com/gntouts/eltrak.gitcd eltrak
Install requirements (it is recommended to use a virtual environment, seevenv orMiniconda):Because uvloop does not support Windows at the moment, you need to skip installing it if you are using a Windows machine.
For Windows:
pip install -r src/req/windows-requirements.txt
For Ubuntu and Debian:
pip install -r src/req/requirements.txt
Activate your environment (if you used one) and run the server
cd srcuvicorn app:app --port=8888
Clone the repository and change directory:
git clone https://github.com/gntouts/eltrak.gitcd eltrak
Build the Docker image from the Dockerfile
docker build -t eltrak .
Start the container
docker run -dp 8888:80 eltrak
Clone the repository and change directory:
git clone https://github.com/gntouts/eltrak.gitcd eltrak
Create a new app:
heroku loginheroku apps:create --region eu eltrak
Set your deployment method:
heroku container:loginheroku stack:set container -a eltrakheroku git:remote -a eltrak
Build and push your app to Heroku
git push heroku main
It is also possible to deploy to Caprover using the captain-definition and the dockerfile.
Any help is welcome. Even if you just provide me with test tracking numbers.
About
eltrak intends to become a free to use API to get shipping status for Greek courier services.