Django Deep Link
Overview
Simple app to get mobile app deep linking in place with basic tracking.
Quickstart
Install Django Deep Link::
python3 -m pip install django-deep-link
Settings
To enable django_deep_link in your project you need to add it to INSTALLED_APPS in your projects settings.py file:
INSTALLED_APPS = (
...
'django_deep_link',
...
)
Add Django Deep Link's URL patterns:
from django_deep_link import urls as django_deep_link_urls
urlpatterns = [
...
path(r"", include(django_deep_link_urls, namespace='django-deep-link')),
...
]
Provide Your Own IP Geodata Handler
import requests
from django.core.cache import cache
def get_ip_geodata(ip_address):
"""Use 3rd party API to obtain Geodata from a given IP."""
if cache.get(ip_address):
return cache.get(ip_address)
params = {}
r = requests.get(f"https://domain.com/{ip_address}", params=params)
r.raise_for_status()
cache.set(ip_address, r.json(), 60*60*24) # 24 hrs
return r.json()
The IP geodata handler must also be configured in your settings, using the IP_GEO_HANDLER setting key. For example:
DEEP_LINK = {
'IP_GEO_HANDLER': 'my_project.my_app.utils.get_ip_geodata'
}
If not specified, the 'IP_GEO_HANDLER' setting defaults to the geodata provided by Deep Link, which leverages IP Stack:
DEEP_LINK = {
'IP_GEO_HANDLER': 'django_deep_link.helpers.ip.get_ip_geodata'
}
Local Development
make env
make pip_install
make migrations
make migrate
make superuser
make serve
or simply make from_scratch
- Visit
http://127.0.0.1:8000/admin/for the Django Admin
Testing
make pytest
make coverage
make open_coverage
Issues
If you experience any issues, please create an issue on Bitbucket.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.3.1] - 2024-04-10
- Added test coverage
[0.3.0] - 2023-06-23
- New packaging method using
pyproject.toml - Fresh migrations
- Moved
model_utilstomixins.py
[0.2.6] - 2021-08-04
Fixed
- Added missing migrations.
[0.2.5] - 2021-07-29
Changed
- Removed print statement
- Moved
get_querystring_as_dictintohelpers
[0.2.4] - 2021-07-29
Added
- Capture query params in visit
[0.2.3] - 2021-07-29
Changed
- Don't assume url pattern
[0.2.2] - 2021-07-29
Added
- Link to mobile and desktop app stores.
Fixed
- Broken app store links in app listing
[0.1.0] - 2021-07-23
- First release on PyPI.
Metadata
Release files for django-deep-link 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-deep-link-0.3.1.tar.gz | 19.7 kB | Without provenance | Details for django-deep-link-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_deep_link-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for django_deep_link-0.3.1-py3-none-any.whl |
Total release size: 39.5 kB
Release files / django-deep-link-0.3.1.tar.gz
| Download URL | django-deep-link-0.3.1.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc8ed1de722c1d1a5ccc593126bf4a8e30cbfae5e2488631147dc083aa3e452f
|
|
BLAKE2b-256 checksum How to use checksums |
3d5e3414f03769a7ef37ec513c2eb2642c4995dc53c72938e02ebf6c306224c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.11
|
Release files / django_deep_link-0.3.1-py3-none-any.whl
| Download URL | django_deep_link-0.3.1-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9b894f00053bd7a581d14fd7cf6cf2e8fcab0f69fddf4a087d44f141bb6f1cc
|
|
BLAKE2b-256 checksum How to use checksums |
181c3711eab311898ef57ac0e38c1e4057b96b8863b899d222cac669a5a9a414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.11
|
Security for django-deep-link 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.