iplocation.net API
Project description
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:
- API version: 1.2.0
- Package version: 1.2.0
- Generator version: 7.18.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/oapicf/openapi-iplocation
Requirements.
Python 3.9+
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openapiiplocation-1.2.0.tar.gz.
File metadata
- Download URL: openapiiplocation-1.2.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7a54ddadfa6e51dcfeb1dc6961d647afec061731c8f50a4434fb4eca916c7e1
|
|
| MD5 |
0756ff826cbe870935fd35d5a1218fe6
|
|
| BLAKE2b-256 |
0cd1d3f30cbcc25d6c92cc433ec431f1c00bbc91c5838de21d75aaf0e0b086f9
|
File details
Details for the file openapiiplocation-1.2.0-py3-none-any.whl.
File metadata
- Download URL: openapiiplocation-1.2.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
810961e5f790696c29c26d4f8e5d72cc82e6784c237f63d20b21b4497d0d2e47
|
|
| MD5 |
55d9f09682d3200213d1658f614731b2
|
|
| BLAKE2b-256 |
1ab09e546c83496287a234177293a877e5fad231f494839fb6f0cb421e2446af
|