Metadata-Version: 2.4
Name: fiftyone_ipintelligence
Version: 4.5.2
Summary: IP Intelligence and IP geolocation for Python that finds an IP address's likely location (country, region, town, and coordinates), connection type, and network, on-premise with a data file or in the cloud. An alternative to MaxMind and IPinfo.
Home-page: https://51degrees.com/?utm_source=pypi&utm_medium=package&utm_campaign=51degrees-python&utm_content=fiftyone_ipintelligence-setup.py&utm_term=url
Author: 51Degrees Engineering
Author-email: engineering@51degrees.com
License: EUPL-1.2
Keywords: 51degrees,ip-intelligence,ip-geolocation,geoip,ip-lookup,asn,ip-to-country,maxmind,ipinfo
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fiftyone_ipintelligence_shared
Requires-Dist: fiftyone_ipintelligence_cloud
Requires-Dist: fiftyone_ipintelligence_onpremise
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 51Degrees IP Intelligence Engines

![51Degrees](https://51degrees.com/img/logo.png?utm_source=github&utm_medium=readme&utm_campaign=51degrees-python&utm_content=fiftyone_ipintelligence-readme.md&utm_term=51degrees-ip-intelligence-engines "Data rewards the curious") **Python IP Intelligence**

[Developer Documentation](https://51degrees.com/ip-intelligence-python/index.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-python&utm_content=fiftyone_ipintelligence-readme.md&utm_term=51degrees-ip-intelligence-engines "developer documentation")

## Introduction

This package aggregates the cloud and on-premise 51Degrees IP intelligence
engines for the [51Degrees Pipeline API](https://51degrees.com/documentation/index.html?utm_source=github&utm_medium=readme&utm_campaign=51degrees-python&utm_content=fiftyone_ipintelligence-readme.md&utm_term=introduction)
and provides the `IpIntelligencePipelineBuilder` which builds a pipeline with
either engine depending on the settings provided:

- Provide a `resource_key` to use the cloud engine.
- Provide a `data_file_path` pointing at a `.ipi` data file to use the
  on-premise engine.

## Usage

```python
from fiftyone_ipintelligence.ipintelligence_pipelinebuilder import IpIntelligencePipelineBuilder

# Cloud
pipeline = IpIntelligencePipelineBuilder(resource_key="YOUR_RESOURCE_KEY").build()

# On-premise
pipeline = IpIntelligencePipelineBuilder(
    data_file_path="51Degrees-LiteIpiV41.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())
```
