Skip to main content

pypoh

A Python Wrapper for the Proof of Humanity Rest API.

Overview

With pypoh you can easily access all the information available at https://app.proofofhumanity.id/ and integrate it in you apps and/or Data Analysis tools.

  • Check if an ETH address has a registered profile at POH.
  • Download a list of Humans with all their data (registry history, given vouches, received vouches, name, photo link, etc).
  • Use the built-in Human() class to manage this data faster.

How to use it

Import

You can easily import pypoh with:

import pypoh

Or import only the methods you need with:

from pypoh import Human, ping, get_list_of_humans

Human Class Usage

pypoh comes with a class called "Human" that has all the data for a single real human registered at Proof of Humanity.

human = Human(address="0xSOME_ETH_ADDRESS")

Some Class Methods:

print(human.get_status_history)

{ "status": "VOUCHING", "time": "2022-01-11T01:13:06.790Z" }

print(human.get_given_vouches)

{ "eth_address": "0xf49a19f72d0e106df462cfd6b5bebe42b6001616", "status": "VOUCHING", "vanity_id": 1, "display_name": "satoshin", "first_name": "Satoshi", "last_name": "Nakamoto", "registered": true, "photo": "https://ipfs.kleros.io/ipfs/QmXmLgii8brfAP7edaabbRHey5VKvFhqqpSFfJf4sD1Lf6/image.jpg", "video": "https://ipfs.kleros.io/ipfs/QmXmLgii8brfAP7edaabbRHey5VKvFhqqpSFfJf4sD1Lf6/video.mp4", "bio": "Chancellor on brink of second bailout for banks.", "profile": "https://app.proofofhumanity.id/profile/0xf49a19f72d0e106df462cfd6b5bebe42b6001615", "registered_time": "2022-01-11T01:11:25.486Z", "creation_time": "2022-01-11T01:11:25.486Z" }

print(human.get_received_vouches)

{ "eth_address": "0xf49a19f72d0e106df462cfd6b5bebe42b6001616", "status": "VOUCHING", "vanity_id": 1, "display_name": "satoshin", "first_name": "Satoshi", "last_name": "Nakamoto", "registered": true, "photo": "https://ipfs.kleros.io/ipfs/QmXmLgii8brfAP7edaabbRHey5VKvFhqqpSFfJf4sD1Lf6/image.jpg", "video": "https://ipfs.kleros.io/ipfs/QmXmLgii8brfAP7edaabbRHey5VKvFhqqpSFfJf4sD1Lf6/video.mp4", "bio": "Chancellor on brink of second bailout for banks.", "profile": "https://app.proofofhumanity.id/profile/0xf49a19f72d0e106df462cfd6b5bebe42b6001615", "registered_time": "2022-01-11T01:11:25.486Z", "creation_time": "2022-01-11T01:11:25.486Z" }

Independent Methods

  • get_raw_list_of_humans: It returns a list of dicts with each human information based on the number and the "order_by" configuration you want.
  • get_raw_set_of_addresses: Similar to the previous ones but it returns a python set instead of a list. It is a bit faster.
  • get_list_of_humans: Similar to the previous ones, but this one returns a list of already instantiated Humans instead.
  • ping: Returns True if there is a correct conection to the Rest API.
  • is_registered: Returns True if the given ETH address is registered at Proof of Humanity.

Example of usage:

list_of_humans = pypoh.get_list_of_humans(amount=10, order_by= "registered_time", order_direction = "desc", include_unregistered = False)

Acknowledgements

This python Wrapper uses this Rest API: https://api-kovan.poh.dev

License

MIT License Copyright (c) 2018 YOUR NAME Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for pypoh 0.105

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypoh 0.105
File Size Uploaded Provenance Actions
pypoh-0.105.tar.gz 7.1 kB Without provenance Details for pypoh-0.105.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pypoh 0.105
File Interpreter ABI Platform Actions
pypoh-0.105-py3-none-any.whl Python 3 none any Details for pypoh-0.105-py3-none-any.whl

Total release size: 13.9 kB

Release files / pypoh-0.105.tar.gz

Download URL pypoh-0.105.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4b3e16c7b183621339a79ed5157b0b662bfc831eb4f24d859dd3db24d34e4e47
BLAKE2b-256 checksum
How to use checksums
a2fee108bb6bf595cef4c5bd39c859cecba8231c8e6880b2d343952da6a04a21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release files / pypoh-0.105-py3-none-any.whl

Download URL pypoh-0.105-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64f82fadfba10336a6ac248778d869790ed1fda9b79788e92ca0f6f5774f857c
BLAKE2b-256 checksum
How to use checksums
c5c1ff61c8f8c9110bc546a031a8e91da6ba4048959b19db93a5275b96aa8354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Security for pypoh 0.105

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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