Skip to main content

Geofencing middleware and NextUne IP/whoami helpers for Django.

Project description

nextune-geofencing

Internal Django app providing:

  • GeofencingMiddleware that attaches request.geofencing, request.country_code, request.country_name
  • WhoAmIView and GeoByIPView wrappers around NextUne geolocation APIs

Installation

Install from your internal index or Git repository, for example:

pip install nextune-geofencing

Django setup

INSTALLED_APPS = [
    # ...
    "nextune_geofencing",
]

MIDDLEWARE = [
    # ...
    "nextune_geofencing.middleware.GeofencingMiddleware",
]

Optional URLs:

from django.urls import include, path

urlpatterns = [
    # ...
    path("v1/geo/", include("nextune_geofencing.urls")),
]

Simple release workflow to PyPI

  1. Bump version in pyproject.toml:
[project]
version = "0.1.1"
  1. Commit and tag:
git add pyproject.toml nextune_geofencing
git commit -m "Bump nextune-geofencing to 0.1.1"
git tag v0.1.1
git push origin main --tags
  1. Build and upload (locally or in CI):
python -m pip install --upgrade build twine
python -m build
twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nextune_geofencing-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nextune_geofencing-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file nextune_geofencing-0.1.0.tar.gz.

File metadata

  • Download URL: nextune_geofencing-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for nextune_geofencing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7646a25e552ea4f65f61122477f4ef22e9f7b31159efffed56d31d808ca8ed45
MD5 8b46389121ea11754dd5fa0d0f13b5cb
BLAKE2b-256 cdfcb28c655112aafb539c8f05925d8127c8419038f95ce9fb6127ebbc24984b

See more details on using hashes here.

File details

Details for the file nextune_geofencing-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nextune_geofencing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1d342910a27101c4b6300b14a9156517ac3111a5542c9ee4cd5d69caf0ee871
MD5 1a1e30800edddfa28201f3a8334e33c3
BLAKE2b-256 b3f6ed2929fdffcc1ea157f2eae1dda379e7af072f49853a808a80bbe0418909

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page