{"id":19073115,"url":"https://github.com/lowerdeez/ok-17track","last_synced_at":"2026-05-18T20:30:19.020Z","repository":{"id":57421100,"uuid":"224155255","full_name":"LowerDeez/ok-17track","owner":"LowerDeez","description":"django-17track is an unofficial 17track.com API wrapper for Django.","archived":false,"fork":false,"pushed_at":"2020-01-17T15:26:10.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T16:41:12.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LowerDeez.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-26T09:41:49.000Z","updated_at":"2020-04-24T06:38:22.000Z","dependencies_parsed_at":"2022-09-03T23:20:32.819Z","dependency_job_id":null,"html_url":"https://github.com/LowerDeez/ok-17track","commit_stats":null,"previous_names":["lowerdeez/django-ok-17track"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LowerDeez%2Fok-17track","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LowerDeez%2Fok-17track/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LowerDeez%2Fok-17track/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LowerDeez%2Fok-17track/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LowerDeez","download_url":"https://codeload.github.com/LowerDeez/ok-17track/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240124937,"owners_count":19751605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T01:45:27.810Z","updated_at":"2026-05-18T20:30:16.946Z","avatar_url":"https://github.com/LowerDeez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"================================\ndjango-ok-17track |PyPI version|\n================================\n\n|Build Status| |Code Health| |Upload Python Package| |Python Versions| |PyPI downloads| |license| |Project Status|\n\ndjango-17track is an unofficial 17track.com API wrapper for Django.\n\nInstallation\n============\n\nInstall with pip:\n\n.. code:: shell\n\n    $ pip install django-ok-17track\n\nUpdate INSTALLED_APPS:\n\n.. code:: python\n\n    INSTALLED_APPS = [\n        ...\n        'track17',\n        ...\n    ]\n\nMake migrations\n\n.. code:: shell\n\n    $ python manage.py migrate\n\n\n\nAvailable settings\n==================\n\n``TRACK17_API_KEY`` - API key for service.\n\n``TRACK17_API_KEY_FUNCTION`` - Custom function to return API key, if you want to store it outside the Django settings.\n\n``TRACK17_COUNTRIES_URL`` - Url to grab countries. Uses `https://www.17track.net/en/apicountry`_.\n\n``TRACK17_CARRIERS_URL`` - Url to grab carriers. Uses `https://www.17track.net/en/apicarrier`_.\n\n\nBasic example to use:\n=====================\n\nHow to get all countries and carriers:\n--------------------------------------\n\n    .. code:: shell\n\n        python managet.py populate_carriers\n    \n\nHow to register tracking number and get it's info:\n--------------------------------------------------\n\n    .. code:: python\n    \n        from typing import List, TYPE_CHECKING\n        \n        from rest_framework import serializers\n        from track17.services import register_track, get_track_info, get_track_info_as_packages\n        from track17.exceptions import DateProcessingError\n        \n        if TYPE_CHECKING:\n            from track17.entity import PackageEntity\n        \n\n        # try to register tracking number at 17track API\n        try:\n            register_track('tracking_number')\n        except DateProcessingError as exc:\n            raise serializers.ValidationError(str(exc))    \n        \n        # try to fetch an actual info about a tracking number\n        try:\n            response: Dict = get_track_info('tracking_number')\n        except DateProcessingError as exc:\n            raise serializers.ValidationError(str(exc))\n\n        accepted_packages = response.get('accepted', [])\n\n        # return packages info as a list of `PackageEntity` (dataclass instance) objects\n        # in a readable way with a represantion of carriers and countries as Django model instances\n        packages: List['PackageEntity'] = get_track_info_as_packages(accepted)\n\n\nOr can use 17track adapter directly:\n------------------------------------\n\n    .. code:: python\n\n        from track17.track17 import Track17Adapter\n\n        \n        track17 = Track17Adapter()\n        response = track17.register('number1', 'number2')\n        response = track17.get_track_info('number1', 'number2')\t\n    \n\n.. |PyPI version| image:: https://badge.fury.io/py/django-ok-17track.svg\n   :target: https://badge.fury.io/py/django-ok-17track\n.. |Build Status| image:: https://travis-ci.org/LowerDeez/django-ok-17track.svg?branch=master\n   :target: https://travis-ci.org/LowerDeez/django-ok-17track\n   :alt: Build status\n.. |Code Health| image:: https://api.codacy.com/project/badge/Grade/8cc48189b13f48c7a04eccd37d4f52d9\n   :target: https://www.codacy.com/app/LowerDeez/django-ok-17track\n   :alt: Code health\n.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/django-ok-17track.svg\n   :target: https://pypi.org/project/django-ok-17track/\n   :alt: Python versions\n.. |license| image:: https://img.shields.io/pypi/l/django-ok-17track.svg\n   :alt: Software license\n   :target: https://github.com/LowerDeez/django-ok-17track/blob/master/LICENSE\n.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/django-ok-17track.svg\n   :alt: PyPI downloads\n.. |Project Status| image:: https://img.shields.io/pypi/status/django-ok-17track.svg\n   :target: https://pypi.org/project/django-ok-17track/  \n.. |Upload Python Package| image:: https://github.com/LowerDeez/django-ok-17track/workflows/Upload%20Python%20Package/badge.svg\n   :target: https://github.com/LowerDeez/django-ok-17track\n   :alt: Project Status\n\n.. _https://www.17track.net/en/apicountry: https://www.17track.net/en/apicountry\n.. _https://www.17track.net/en/apicarrier: https://www.17track.net/en/apicarrier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flowerdeez%2Fok-17track","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flowerdeez%2Fok-17track","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flowerdeez%2Fok-17track/lists"}