Giter Club home page Giter Club logo

eltrak's Introduction

eltrak

Heroku

Heroku Free tier is now terminated, so the app is no longer publicly available. All links in the README using the https://eltrak.herokuapp.com URL are invalid. I will try to host it somewhere else soon. In the meantime, you can easily deploy eltrak yourself. Sorry for the inconvenience.

Introduction

eltrak intends to become a free to use API to get shipping status for Greek courier services.

Currently, it supports ACS, 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.

Usage

Simply, perform a GET request to the following URL:

https://eltrak.herokuapp.com/v2/track/[COURIER]/[TRACKINGNUMBER]

For example in Python:

import requests
res = 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]

Installation

Deploy to Docker - pull from Docker Hub

  1. Pull the Docker image and start the container:

    docker pull gntouts/eltrak:latest
    docker run -d -p 8888:80 eltrak:latest

Deploy locally

In order to run the server locally (or anywhere else) run the following commands:

  1. Clone the repository and change directory:

    git clone https://github.com/gntouts/eltrak.git
    cd eltrak
  2. Install requirements (it is recommended to use a virtual environment, see venv or Miniconda): 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

  3. Activate your environment (if you used one) and run the server

    cd src
    uvicorn app:app --port=8888

Deploy to Docker - build it yourself

  1. Clone the repository and change directory:

    git clone https://github.com/gntouts/eltrak.git
    cd eltrak
  2. Build the Docker image from the Dockerfile

    docker build -t eltrak .

  3. Start the container

    docker run -dp 8888:80 eltrak

Deploy to Heroku

  1. Clone the repository and change directory:

    git clone https://github.com/gntouts/eltrak.git
    cd eltrak
    
  2. Create a new app:

    heroku login
    heroku apps:create --region eu eltrak
  3. Set your deployment method:

    heroku container:login
    heroku stack:set container -a eltrak
    heroku git:remote -a eltrak
  4. Build and push your app to Heroku

    git push heroku main

Other methods

It is also possible to deploy to Caprover using the captain-definition and the dockerfile.

Contributing

Any help is welcome. Even if you just provide me with test tracking numbers.

Projects using eltrak

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.