Skip to main content

A simple python library to find the public ip address of the system.

Project description

Pyipify

ipify-py is a python module that allows you to interact with the ipify API in synchronous and asynchronous ways. It also provides a command-line interface for easy access.

The ipify API is a simple service that returns your public IP address. You can use it to find out your IP address from any device or platform.

languages SearchHits Top Language Dependencies Status Total Issues Open Issues License

Features

  • Supports both IPv4 and IPv6 addresses
  • Supports both sync and async requests using requests and aiohttp libraries
  • Provides a CLI tool to get your IP address from the terminal
  • Provides a simple and intuitive interface

Installation

Install my-project with npm

pip install Pyipify

Examples

get ip address synchronous

from Pyipify.synchronous import find_ipv4,find_ipv6
ipv4_address = find_ipv4()
ipv6_address = find_ipv6()
print(ipv4_address,ipv6_address)

get ip address asynchronously

from Pyipify.asynchronous import find_ipv4,find_ipv6
import asyncio
async def main():
    ipv4_address = await find_ipv4()
    ipv6_address = await find_ipv6()
    return ipv4_address,ipv6_address
asyncio.run(main())

use cli to get ip address python -m ipify -h to get started

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

License

Apache 2.0

Support

For support, email sigireddybalasai@gmail.com or open an issue here

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

pyipify-0.0.1.1.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file pyipify-0.0.1.1.tar.gz.

File metadata

  • Download URL: pyipify-0.0.1.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for pyipify-0.0.1.1.tar.gz
Algorithm Hash digest
SHA256 3629d4e8647fcbd85d1fc203d02f029c3e8385d5b1fe44909cf12a418160a946
MD5 18a45cd7fb4e3da7b3755c7cd34914c8
BLAKE2b-256 b2734b7bd4e58466602cd37dc21978abad0cc738128d468dda3f1f4a9cc3f12c

See more details on using hashes here.

Supported by

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