Saravanan666/pypi-org huggingface dataset:
Package: ipfs-car-decoder
Validate what an IPFS gateway returns by decoding and validating the CAR block.UsageCARs can be read from memory or file and can be exported as a file/folder or byte stream>>> import asyncio
>>> import aiohttp
...
>>> from ipfs_car_decoder import ChunkedMemoryByteStream, stream_bytes
...
>>> ipfs_hash = 'bafkreibm6jg3ux5qumhcn2b3flc3tyu6dmlb4xa7u5bf44yegnrjhc4yeq'
...
>>> async def test():
...     stream = ChunkedMemoryByteStream()
...     async with aiohttp.ClientSession() as session:
...         async with session.get(f'https://ipfs.io/ipfs/{ipfs_hash}', headers={'Accept':'application/vnd.ipld.car'}) as resp:
...             resp.raise_for_status()
...             assert resp.content_type == 'application/vnd.ipld.car'
...             async for chunk, _ in resp.content.iter_chunks():
...                 await stream.append_bytes(chunk)
...     await stream.mark_complete()
...     acc = b''
...     async for chunk in stream_bytes(ipfs_hash, stream):
...         acc += chunk
...     print(acc)
...
>>> asyncio.run(test())
b'hello'
Package: ipfs-cid
ipfs-cidA library for building IPFS CID v1 compatible content identifiers using fixed
encoding parameters.UsageGet CID from bytesAll at oncefromipfs_cidimportcid_sha256_hashdata=b"Hello world"result=cid_sha256_hash(data)assertresult=="bafkreide5semuafsnds3ugrvm6fbwuyw2ijpj43gwjdxemstjkfozi37hq"In chunks with a generatorfromtypingimportIterablefromioimportBytesIOfromipfs_cidimportcid_sha256_hash_chunkeddefas_chunks(stream:BytesIO,chunk_size:int)->Iterable[bytes]:whilelen((chunk:=stream.read(chunk_size)))>0:yieldchunkbuffer=BytesIO(b"Hello world")result=cid_sha256_hash_chunked(as_chunks(buffer,4))assertresult=="bafkreide5semuafsnds3ugrvm6fbwuyw2ijpj43gwjdxemstjkfozi37hq"Wrap an existing SHA 256 checksum as a CIDWARNING:This will lead to an invalid CID if an invalid digest is provided.
This is not possible to validate against without the original data.fromhashlibimportsha256fromipfs_cidimportcid_sha256_wrap_digestdata=b"Hello world"digest=sha256(data).digest()result=cid_sha256_wrap_digest(digest)assertresult=="bafkreide5semuafsnds3ugrvm6fbwuyw2ijpj43gwjdxemstjkfozi37hq"Unwrap a compatible CID to a sha256 digestNOTE:Thecid_sha256_unwrap_digestfunction will throw anAttributeErrorif the input CID is not using the same encoding parameters.fromhashlibimportsha256fromipfs_cidimportcid_sha256_unwrap_digestdata=b"Hello world"digest=sha256(data).digest()cid="bafkreide5semuafsnds3ugrvm6fbwuyw2ijpj43gwjdxemstjkfozi37hq"result=cid_sha256_unwrap_digest(cid)assertresult==digestEncoding FormatThe CID specsupports multiple different
encodings and hashing algorithms.The resulting CID string is composed of the following components:{multibase prefix} + multibase_encoded({cid version} + {content type} + {multihash})This library always uses the following encoding parameters:multibaseCID versionContent TypeMultihashbase32cidv1rawsha2-256More details about the formats below:Multibaseencodingcodedescriptionbase32brfc4648 case-insensitive - no paddingMulticodecnamecodedescriptioncidv10x01CID v1sha2-2560x12sha2-256 with 256 bit digestraw0x55raw binary
Package: ipfs-cid-v0
Python IPFS CIDComputes IPFS CIDv0s exposed as a Python module.This library computes the IPFS DAG of the input data and then returns the CID of the root node.
This returns the same CID as would be computed byipfs add <file>.This library also computes the hash of the data after it has been converted to the DAG-PB format
and processed, primarily for debugging and testing purposes.Examplesfromipfs_cid_v0importcompute_cidcid:str=compute_cid(b"1234")# Returns QmTPqcLhVnCtjoYuCZwPzfXcFrUviiPComTepHfEEaGf7gfromipfs_cid_v0importcompute_hashcid_hash:bytes=compute_hash(b"1234")# Returns b'\x12 K\x1b\x80\x9cr\xce\x0e\xf8\xd8\x15\xb9"\xeef\x04/\xc4\xaf\xe5\xc9G\xad\xd2\xa5,\xbcR\xd8\xb0\x19_\xa3'fromipfs_cid_v0importcompute_hash_hexcid_hash_hex:str=compute_hash_hex(b"1234")# Returns '12204b1b809c72ce0ef8d815b922ee66042fc4afe5c947add2a52cbc52d8b0195fa3'BuildYou must have rust/cargo installed. Then run:pipinstallmaturin
maturindevelop--releaseInstall in your python environment if doesn't automatically get picked up:python-mpipinstall./target/wheels/ipfs_cid_v0-0.0.1-cp310-cp310-manylinux_2_34_x86_64.whlCurrent limitationsOnly supports CID v0Only supports files, not directoriesOnly supports the default IPFS block size (256 KiB)
Package: ipfsclient
ipfsclientIPFS RPC ClientInstallationDocumentationBuild docs locallyTestsBefore running tests:Regenerate pb2.py filesIpfs setupRun the ipfs daemonIPFS troubleshootingInstallationpip install ipfsclientDocumentationhttps://ipfsclient.readthedocs.io/Build docs locallymkdocs serveTestsTo only run tests:pytestTo run all checks:noxBefore running tests:Regenerate pb2.py filescd protobuf;
protoc --python_out=../proto --proto_path=protobuf protobuf/sample.protoIpfs setuphttps://docs.ipfs.tech/install/Run the ipfs daemonipfs daemon --api /ip4/0.0.0.0/tcp/5001Check the status of your node at:http://localhost:5001/webuihttps://webui.ipfs.io/#/statusIPFS troubleshootingSet the log level, send the logs to a file, and search the file for relevant messagesexport IPFS_LOGGING=<debug|info|error>
ipfs daemon --debug 2>&1 | tee ipfs.log
cat ipfs.log | grep test_directoryIf you find something important, you can show the first few lines around that messagegrep -C 10 '2023-04-13T17:31:49.712-0400' ipfs.logHere is an example of an error message in these logs:2023-04-13T17:31:49.712-0400	DEBUG	cmds/http	http/handler.go:90	incoming API request: /files/mkdir?arg=test_directory
2023-04-13T17:31:49.712-0400	DEBUG	cmds	go-ipfs-cmds@v0.8.2/command.go:161	error occured in call, closing with error: paths must start with a leading slash
Package: ipfscluster
IPFS Cluster HTTP APIThis is a python package to interact with the HTTP REST API of the IPFS
cluster.Full API
documentationis available on gitlab pages.Installationipfsclusteris available from the PyPI repository:pipinstallipfsclusterGetting an IPFS Cluster RunningTo try the API out, you need to have a running IPFS cluster. The easiest
way to get one of those is to usedocker. In thedocker-compose.ymlfile shown below, you will need to adjust thevolumestags to reference actual folders on your host machine. The
change inenvironmentvariables foripfs_clusterservice makes
use the docker network DNS resolution by service name. Since our docker
agent is calledipfs, we can get its IP address in the internal,backendnetwork by usingipfsas its DNS name.Copy this YML into adocker-compose.ymlfile in some folder and then
rundocker-composeup.version:"3.7"services:ipfs:image:ipfs/go-ipfs:latestports:-"4001:4001"-"5001:5001"networks:-backendvolumes:-~/ipfs/ipfs:/data/ipfsipfs_cluster:image:ipfs/ipfs-cluster:latestports:-"9094:9094"-"9095:9094"-"9096:9096"volumes:-~/ipfs/ipfs-cluster:/data/ipfs-clusternetworks:-backenddepends_on:-ipfsenvironment:-CLUSTER_IPFSHTTP_NODEMULTIADDRESS=/dns4/ipfs/tcp/5001-CLUSTER_IPFSPROXY_NODEMULTIADDRESS=/dns4/ipfs/tcp/5001networks:backend:Try out the APINow that you have a cluster running, you can try the API out. Open a
python CLI and try:client=connect()m={'name':'bytes','cid':{'/':'QmZfF6C9j4VtoCsTp4KSrhYH47QMd3DNXVZBKaxJdhaPab'},'size':30}withclient:r=client.add_bytes(b"Mary had a little lamb")assertr==mRunning Unit TestsRunning unit tests can prove to be a massive pain because the gitlab CI
runner runs on docker. For a project like this that usesdocker-compose, we have to usedocker-in-dockeraccording to
their instructions. However, the documentation is sparse and there are
lots of dead-ends… Here are the steps to get thedocker-compose.ymlfile to work:Install a localgitlab-runnerusingbrew installgitlab-runner.gitlab-runnerexec docker--docker-privilegedtest. Notice that
there is a--docker-privilegedargument. Without that, thedocker-in-dockerwon’t work.Make sure all themultiaddrreference thedockerservice
(which hosts all the other containers usingdind).toxshould work, but for some reason: running the tests usingtoxproduces connection refused errors, whereas running straight
withpytestdoes not. Something about the tox environment screws
things up.
Package: ipfskvs
ipfs (interplanetary filesystem) kvs (key value store)InstallationDocumentationBuild docs locallyTestsBefore running tests:Regenerate pb2.py filesIpfs setupRun the ipfs daemonIPFS troubleshootingInstallationpip install ipfskvsDocumentationhttps://ipfs-kvs.readthedocs.io/Build docs locallymkdocs serveTestsTo only run tests:pytest --cov=ipfskvs --log-cli-level=debugTo run all checks:noxBefore running tests:Regenerate pb2.py filescd protobuf;
protoc --python_out=../proto --proto_path=protobuf protobuf/sample.protoIpfs setuphttps://docs.ipfs.tech/install/Run the ipfs daemonipfs daemon --api /ip4/0.0.0.0/tcp/5001Check the status of your node at:http://localhost:5001/webuihttps://webui.ipfs.io/#/statusIPFS troubleshootingSet the log level, send the logs to a file, and search the file for relevant messagesexport IPFS_LOGGING=<debug|info|error>
ipfs daemon --debug 2>&1 | tee ipfs.log
cat ipfs.log | grep test_directoryIf you find something important, you can show the first few lines around that messagegrep -C 10 '2023-04-13T17:31:49.712-0400' ipfs.logHere is an example of an error message in these logs:2023-04-13T17:31:49.712-0400	DEBUG	cmds/http	http/handler.go:90	incoming API request: /files/mkdir?arg=test_directory
2023-04-13T17:31:49.712-0400	DEBUG	cmds	go-ipfs-cmds@v0.8.2/command.go:161	error occured in call, closing with error: paths must start with a leading slash
Package: ipfspy
Welcome to IPFSPy by AlgoveraWhat is IPFSPy?IPFSPy is a python library by Algovera to interact with IPFS and IPFS
ecosystem such as the common pinning services. It is designed by data
scientists for data scientists to interact with the IPFS ecosystem
without leaving the comfort of python and jupyter notebook.You can learn more about IPFShere.IPFS is built using the go-lang or javascript. With IPFSPy, you can
interact with IPFS using the exposedHTTP RPC
API.Ipfspy has two different implementations to interact with IPFSAccess to most of what HTTP RPC API throughipfspy.ipfshttpapiWithipfspy.ipfshttpapi, you can either use local, infura or
public nodes. In order to use local node, you will need a IPFS
deamon running in the form of IPFS Desktop, IPFS Campanion or
IPFS CLI. As an alternative, you can connect via theInfura’s dedicated IPFS gateway.fsspec-like
implementation throughipfspy.ipfspecWhat is ipfsspec?ipfsspec is the fsspec-like implementation for IPFS. Throughipfspy.ipfsspec, you get access to bothlocalandinfuranodes
but thepublicnode is read-only.Localnode offers both read
and write. In order to uselocalnode, you will need a local node
running locally through IPFS Desktop or IPFS Companion or the IPFS
CLI.Advantages of fsspec-like implementationsmany data science libraries likedask,pandasandxarrayuses fsspec for path and file handlingprovides an uniform APIsSince many data science use fsspec, by implementing ipfsspec, fsspec
supports IPFS.InstallingYou can install the library simply throughpip install ipfspyIf you plan to contribute to this library, 1. clone the repo locallygit clone https://github.com/algoveraai/ipfspyInstall an editable version of the repopip install -e .[dev]submit PRHow to useipfshttpapiExtend the IPFSApiapi=IPFSApi()Changed to local nodeChange to other nodes like below. You can choose one oflocalinfuraorpublicapi.change_gateway_type='infura'Changed to infura nodeapi.change_gateway_type='local'Changed to local nodeTo add a file to IPFS,res,obj=api.add_items('output/test.txt');obj[{'Name': 'test.txt', 'Bytes': 20},
 {'Name': 'test.txt',
  'Hash': 'QmbwFKzLj9m2qwBFYTVrBotf4QujvzTb1GBV9wFcNPMctm',
  'Size': '28'}]To retrieve a file from IPFSresponse,content=api.cat_items(cid='QmbwFKzLj9m2qwBFYTVrBotf4QujvzTb1GBV9wFcNPMctm');content"\n'''\nFirst file\n'''\n"ipfsspecimportfsspec,io,os,asynciofromipfspy.ipfsspec.asynimportAsyncIPFSFileSystemfromfsspecimportregister_implementationRegister the ipfsspec to fsspecregister_implementation(AsyncIPFSFileSystem.protocol,AsyncIPFSFileSystem)classfs:ipfs=fsspec.filesystem("ipfs")file=fsspec.filesystem("file")Changed to local nodeLikeipfspy.ipfshttpapi, you can change the node as suchfs.ipfs.change_gateway_type='public'Changed to public nodefs.ipfs.change_gateway_type='local'Changed to local nodeAdd a file to IPFS using fsspec-like apiput_file_res=fs.ipfs.put(path='output/test.txt',rpath='/test_put_file');put_file_res'QmbwFKzLj9m2qwBFYTVrBotf4QujvzTb1GBV9wFcNPMctm'Retrieve a file from IPFs using fsspec-like apifs.ipfs.cat('QmbwFKzLj9m2qwBFYTVrBotf4QujvzTb1GBV9wFcNPMctm')b"\n'''\nFirst file\n'''\n"
Package: ipfsspec
ipfsspecA readonly implementation of fsspec for IPFS.This project is currently very rudimentaty. It is not yet optimized for efficiency and is not yet feature complete. However it should be enough to list directory contents and to retrieve files fromipfs://resources via fsspec. A simple hello worlds would look like:importfsspecwithfsspec.open("ipfs://QmZ4tDuvesekSs4qM5ZBKpXiZGun7S2CYtEZRB3DYXkjGx","r")asf:print(f.read())The current implementation uses a HTTP gateway to access the data. It tries to use a local one (which is expected to be found athttp://127.0.0.1:8080) and falls back toipfs.ioif the local gateway is not available.You can modify the list of gateways using the space separated environment variableIPFSSPEC_GATEWAYS.
Package: ipfs-stac
The EASIER Data Initiative's Python ClientFeaturesSimple CID Data RetrievalCID CSV To Dataframe ObjectQuerying EASIER STAC API by Bounding BoxSingle Band RetrievalMulti Band RetrievalInstallationThe client can be installed through pip$pipinstallipfs-stacLanguage SupportThe client currently supports Python versions 3+UsageCreate a client objectfromipfs_stacimportclient# Create a new client object without a local node (uses remote gateways)easier=client.Web3(stac_endpoint="<my_stac_server>/api/v1/pgstac/")# If you want to use your local IPFS node (preferred), specify the endpoint in the local_gateway argumenteasier=client.Web3(local_gateway="127.0.0.1",stac_endpoint="<my_stac_server>/api/v1/pgstac/")Fetch a CID from IPFS# Simple hello world exampledata=easier.getFromCID("QmZ4tDuvesekSs4qM5ZBKpXiZGun7S2CYtEZRB3DYXkjGx")print(data)"""hello worlds"""Get CID CSV Data to Pandas Dataframedf=easier.getCSVDataframeFromCID("bafybeifw6kcodgxnamtuvhkxgaf4ep2rwscjae3gnzxb3zj5c6zyea2nri")print(f"Data frame length:{len(df)}")"""Data frame length: 3510"""Query STAC API By Bounding Boxeasier=client.Web3(local_gateway="",stac="<YOUR STAC ENDPOINT GOES HERE>")"""Retrieve all items from STAC catalog that are in bounding box with searchSTACByBox method (2 arguments)1. Coordinates of bounding box2. Name(s) of STAC collections)"""# Use any collection name you want. This is just an exampleitems=easier.searchSTACByBox([-76.964657,38.978967,-76.928008,39.002783],"landsat-c2l1")"""The searchSTACByBoxIndex by method takes 3 arguments1. Coordinates for the bounding box2. Name of the STAC collection to query3. Index of the item you want to retrieve"""item=easier.searchSTACByBoxIndex([-76.964657,38.978967,-76.928008,39.002783],"landsat-c2l1",0)# In this example, 'nir08' is the name of the band (asset) we want to retrieve from a landsat itemband=easier.getAssetFromItem(item,'nir08')# Optionally, you can fetch multiple assets by the getAssetsFromItem Methodbands=easier.getAssetsFromItem(item,["blue","red"])# Returns array of assetsThe asset object# This snippet extends the previous under "Query STAC API By Bounding Box"# The asset object, when printed, will return the CIDprint(band)# QmNddx9BvBsQMXgwp6a83D2wiLrmovgCpRKVYKSJoWNNbx# The asset content (bytes) can be found in asset.data. If this is None, you can call the fetch method to retrieve the data.band.fetch()print(band.data)# b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x...# Alternatively, you can also transform the asset data in different formats such as a numpy arrayband_np=band.to_np_ndarray()print(band_np)# [[0. 0. 0. ... 0. 0. 0.]#  [0. 0. 0. ... 0. 0. 0.]#  [0. 0. 0. ... 0. 0. 0.]#  ...#  [0. 0. 0. ... 0. 0. 0.]#  [0. 0. 0. ... 0. 0. 0.]#  [0. 0. 0. ... 0. 0. 0.]]AttributionsThis project was made possible by the followingipfsspecpystac-client
Package: ipgdrive
A service that writes the public ip address of the host computer to a file on Google Drive.# after setting up ~/.config/ipgdrive/cfg.json# setup a cronjob to write the public ip address to# Google doc every 5 minutesipgdrivesetupjob-m5Contents1Installation2Setup3Use4Contributing4.1Installing for development4.2Running the tests4.3Adding documentation5Credits1Installationpipinstallipgdrive2SetupTo enable Google Drive access, follow theinstructions hereto create a service account with Google Drive access, and create a json key file for it.Don’t forget to follow all the above instructions, including sharing your spreadsheet with an email you have in yourjson_key['client_email'](Otherwise you’ll get aSpreadsheetNotFoundor anAPIErrorwith"PERMISSION_DENIED"exception when trying to open it).Place this file in the~/.config/ipgdrive/folder, and rename it togoogle_drive_service_account_key.json.Additionally, create acfg.jsonfile inside the~/.config/ipgdrive/folder, and populate it with the following values:{"spreadsheet_name":"my_server_public_ip","username":"momo","freq_minutes":5}The username is for the user running the process on the server, NOT the Google account username.3Use# after setting up ~/.config/ipgdrive/cfg.json# setup a cronjob to write the public ip address to# Google doc every 5 minutesipgdrivesetupjob-m54ContributingPackage author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.4.1Installing for developmentClone:gitclonegit@github.com:shaypal5/ipgdrive.gitInstall in development mode, including test dependencies:cdipgdrivepipinstall-e'.[test]'4.2Running the testsTo run the tests use:cdipgdrivepytest4.3Adding documentationThe project is documented using thenumpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings. When documenting code you add to this project, followthese conventions.Additionally, if you update thisREADME.rstfile,  usepython setup.py checkdocsto validate it compiles.5CreditsCreated byShay Palachy(shay.palachy@gmail.com).
Package: ipgeo
ipgeo is a python module inspired by another ruby gem [huacnlee/ip-location](https://github.com/huacnlee/ip-location).The pypi page of ipgeo ishttps://pypi.python.org/pypi/ipgeo.ipgeo is used to retrieve geo info for ip address via taobao ip service(http://ip.taobao.com) .The Limitation of ipgeo is the query frequency should be less than 10 per second (http://ip.taobao.com/restrictions.php).For more information, please visit ipgeo’s github page (https://github.com/aichaoguy/ipgeo) .
Package: ipgeobase-importer
DEPRECATEDДаннная версия импортировщика устаревшая.
Актуальный ip2geo здесь:https://github.com/m-messiah/ip2geoPlease, check out:https://github.com/m-messiah/ip2geofor actual versionIpGeoBase importerИмпортер ipgeobase базы русских городов в файлы, понятные для nginx geoip module, с поддержкой кодов регионов РФ.ПринципСкачивает geo_files.zip с сайта ipgeobase.ruКонвертирует базу в два файла:city.txt, вида: <start_ip>-<end_ip> base64(<city_name>);region.txt, вида: <start_ip>-<end_ip> <region_code>; (01-99)Скачивает списки TOR с torproject и blutmagie.deСоздает tor.txt, вида: <start_ip>-<end_ip> 1;Установкаpipinstallipgeobase-importerЗапускipgeobase-importer<output_dir>Nginxgeo$region{ranges;includegeo/region.txt;}geo$city{ranges;includegeo/city.txt;}geo$is_tor{ranges;default0;includegeo/tor.txt;}MaxMind geo importerСкрипт импорта базы MaxMind в map для nginx (спасибо @ilnurkhal)Требует Python3, requests и iptools.Формат запуска:ip-maxmind<lang>ipv<ipver><filename>[filters]Где:lang- язык, которым будут записаны названия городов (как они указаны в MaxMind)ipver- версия IP для nginx (4 или 6)filename- путь до файла выводаfilters - фильтры для базы вывода. Могут быть:include <COUNTRY_CODE> [<COUNTRY_CODE>…] - выводить города только из указанных стран.exclude <COUNTRY_CODE> [<COUNTRY_CODE>…] - выводить города, не из указанных стран.или не быть вообще, тогда вывод для всех стран.
Package: ipgeocache
ipgeocacheA small cache layer for IP geolocation info.importipgeocacheipgeocache.get("<some ip address>")If that IP has been requested before, it returns the information from cache. Else, it requests out tohttps://ipinfo.ioInstallationRequirespython3.6+To install with pip, run:pip install ipgeocacheThis requires you to get an access token fromhere, can do 50,000 lookups per month as long as you're using it for non-commercial projects.After setting theIPINFO_TOKENenvironment variable:>>>importipgeocache,logzero>>>ipgeocache.get("8.8.8.8",logger=logzero.logger)["hostname"][D20090617:56:31__init__:62]CacheMiss:8.8.8.8,requestingandwritingto/home/sean/.local/share/ipgeocache/8.8.8.8'dns.google'>>>ipgeocache.get("8.8.8.8",logger=logzero.logger)["hostname"][D20090617:56:35__init__:58]CacheHit:8.8.8.8,reading/home/sean/.local/share/ipgeocache/8.8.8.8'dns.google'>>>ipgeocache.get("8.8.8.8"){'ip':'8.8.8.8','hostname':'dns.google','city':'Mountain View','region':'California','country':'US','loc':'37.4056,-122.0775','org':'AS15169 Google LLC','postal':'94043','timezone':'America/Los_Angeles'}Purpose is to just be a thin wrapper that caches this info, so I don't have to think about it for myrandom projects.The full function signature is:ipgeocache.get(ip_address:str,token:Optional[str]=None,cache_dir:Optional[str]=None,logger:Optional[logging.Logger]=None)->Dict[str,Any]"""Get geolocation info for an IP addressoptional parameters:token: ipinfo token to use, if IPINFO_TOKEN not set as an environment variablecache_dir: directory to use for cache, overrides default (XDG_DATA_DIR/ipgeocache) if givenlogger: a logger to send cache hit/miss info out on"""To change where this stores IP info, you can set theIPGEOCACHE_DIRenvironment variable.CLIAlso installs a basicipgeocachescript, which you can pass an IP address to:$ ipgeocache --help
Usage: ipgeocache [OPTIONS] IP

  Gets geolocation information for an IP address

  For example: 'ipgeocache 192.30.255.112'

Options:
  --ipinfo-token TEXT  Authentication token to use ipinfo API.
                       Consult https://ipinfo.io/signup

  --json               Print geolocation info as JSON
  --help               Show this message and exit.$ ipgeocache --json 8.8.8.8
{
    "city": "Mountain View",
    "country": "US",
    "hostname": "dns.google",
    "ip": "8.8.8.8",
    "loc": "37.4056,-122.0775",
    "org": "AS15169 Google LLC",
    "postal": "94043",
    "region": "California",
    "timezone": "America/Los_Angeles"
}Also accessible likepython -m ipgeocache
Package: ipgeolocation
Installation$ pip install ipgeolocationFeaturesipgeolocation, ** Retrieve IP Geolocation information **How to install ?$ pkg install python -y
$ pip install ipgeolocation
$ pip ipgeolocationRun ?$ ipgeolocationDisclaimerWe are not responsible for your loss by this tool.
this tool is made for Education/Learning Purpose.
Dont harm anyone using this tool.Usage$ ipgeolocation -h

Author : Maldevel
PIP module : Parixit Sutariya
Github : github.com/Bhai4You
Blogspot : https://bhai4you.blogspot.comGithub
Package: ipget
This package is for those that know the local ip in linux.>>> import ipget
>>> a = ipget.ipget()
>>> print a.ipaddr("eth0")
192.168.0.2/24
>>> print a.ipaddr6("eth0")
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64
>>> print a.mac("eth0")
xx:xx:xx:xx:xx:xxThank you.
…