Skip to main content

openapiiplocation

OpenAPI v3 specification and a set of generated API clients for iplocation.net

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/oapicf/openapi-iplocation.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/oapicf/openapi-iplocation.git)

Then import the package:

import openapiiplocation

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapiiplocation

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import openapiiplocation
from openapiiplocation.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.iplocation.net
# See configuration.py for a list of all supported configuration parameters.
configuration = openapiiplocation.Configuration(
    host = "https://api.iplocation.net"
)



# Enter a context with an instance of the API client
with openapiiplocation.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapiiplocation.DefaultApi(api_client)
    ip = 'ip_example' # str | An IPv4 or IPv6 address that you would like to lookup.
    format = 'format_example' # str | Output format, the following formats are supported: plain xml json jsonp php csv serialized (optional)
    delimiter = 'delimiter_example' # str | Delimiter between proxies. Can be used only with format plain. The following types are supported: 1 for \"\\n\", 2 for \"<br>\". (optional)

    try:
        # Get geolocation of an IP address
        api_response = api_instance.root_get(ip, format=format, delimiter=delimiter)
        print("The response of DefaultApi->root_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->root_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.iplocation.net

Class Method HTTP request Description
DefaultApi root_get GET / Get geolocation of an IP address

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

blah+oapicf@cliffano.com

Download files

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

Source Distribution

openapiiplocation-1.3.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

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

openapiiplocation-1.3.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file openapiiplocation-1.3.0.tar.gz.

File metadata

  • Download URL: openapiiplocation-1.3.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for openapiiplocation-1.3.0.tar.gz
Algorithm Hash digest
SHA256 af994e1cdfc49a3b986f9ca2aae555fe8acc8bc7ad5d1ea428520510a79d4f95
MD5 c779fe98cd10574c57b294459737892f
BLAKE2b-256 283243f5369aed675dede596f3c3f6c6192f03c07fa2468ad6dd30e06c53eaef

See more details on using hashes here.

File details

Details for the file openapiiplocation-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openapiiplocation-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03dceb1c98b4252e97a8c0a3f8ee153358d559fb089b7d40e3743d1371e6dff6
MD5 7e6f6816478cebf30de708c96b126155
BLAKE2b-256 76247b2cfeb289104cb78206a14ce345cb0ee238832715b30b3ce86066addca7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.0

2 files

1.1.0

1 file

1.0.0

1 file

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