Skip to main content

51Degrees IP Intelligence Engines - OnPremise

51Degrees Python IP Intelligence

Developer Documentation

Introduction

This package resolves IP addresses to location, network and registration information using a local .ipi data file and the 51Degrees Pipeline API.

The native 51degrees-cxx library is included as a git submodule and wrapped with SWIG.

Building

The SWIG generated wrapper (ipi_python_wrap.cxx and IpIntelligenceEngineModule.py) is committed to the repository so SWIG is only needed when regenerating it (run PreBuild.bat / PreBuild.sh).

A C++17 compiler is required to build the native extension:

git submodule update --init --recursive
python setup.py build_clib build_ext

Data files

The on-premise engine requires a .ipi data file. The free Lite data file, 51Degrees-LiteV41.ipi, is linked from the data repository, which is included as the nested submodule cxx/data and contains evidence files for testing. From the root of a checkout of 51degrees-python, download it by running sh cxx/data/get-data-files.sh 51Degrees-LiteV41.ipi, or ./cxx/data/get-data-files.ps1 51Degrees-LiteV41.ipi in PowerShell. Without a checkout, download it from https://distributor.51degrees.com/api/v2/free/ipi-lite-v41, which sends it gzip compressed.

Usage

from fiftyone_ipintelligence_onpremise.ipintelligence_onpremise_pipelinebuilder import IpIntelligenceOnPremisePipelineBuilder

pipeline = IpIntelligenceOnPremisePipelineBuilder(
    data_file_path="51Degrees-LiteV41.ipi",
    licence_keys="",
    usage_sharing=False).build()

flowdata = pipeline.create_flowdata()
flowdata.evidence.add("query.client-ip", "185.28.167.78")
flowdata.process()
print(flowdata.ip.registeredname.value())

Find out more

Metadata

Release files for fiftyone-ipintelligence-onpremise 4.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fiftyone-ipintelligence-onpremise 4.5.3
File Size Uploaded Provenance Actions
fiftyone_ipintelligence_onpremise-4.5.3.tar.gz 414.4 kB Without provenance Details for fiftyone_ipintelligence_onpremise-4.5.3.tar.gz

Release files / fiftyone_ipintelligence_onpremise-4.5.3.tar.gz

Download URL fiftyone_ipintelligence_onpremise-4.5.3.tar.gz
Size 414.4 kB
Tags Source
SHA-256 checksum
How to use checksums
41053a11939f914d89f0867e37a3c40f0cac39ab7adab4c2ec7ac31cf73b389b
BLAKE2b-256 checksum
How to use checksums
5b5134c5892c3c5bced2db9b05975c5c1e4470dfb5b969d899b04ccf8d50093a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for fiftyone-ipintelligence-onpremise 4.5.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page