Open-Rarity library is an open standard that provides an easy, explanable and reproducible computation for NFT rarity
Project description
OpenRarity
We’re excited to announce OpenRarity, a new rarity protocol we’re building for the NFT community. Our objective is to provide a transparent rarity calculation that is entirely open-source, objective, and reproducible.
With the explosion of new collections, marketplaces and tooling in the NFT ecosystem, we realized that rarity ranks often differed across platforms which could lead to confusion for buyers, sellers and creators. We believe it’s important to find a way to provide a unified and consistent set of rarity rankings across all platforms to help build more trust and transparency in the industry.
We are releasing the OpenRarity library in a Beta preview to crowdsource feedback from the community and incorporate it into the library evolution.
See the full announcement in the blog post.
CLI Usage
If you already have a json file containing the metadata for the tokens you want to rank you can run the following which will print ranks to stdout.
❯ openrarity rank data/boredapeyachtclub/tokens.json | head -n 10
token_id unique_traits ic rank
---------- --------------- ------- ------
7495 0 42.0592 1
4873 0 40.4554 2
8854 0 40.2091 3
446 0 40.017 4
73 0 39.6501 5
8135 0 39.5842 6
8976 0 39.5072 7
4980 0 39.4849 8
Likewise you can write to a json file
❯ openrarity rank data/boredapeyachtclub/tokens.json -o boredapeyachtclub_ranks.json
If you don't have metadata available you can fetch it from OpenSea first
❯ openrarity opensea fetch-assets --slug boredapeyachtclub --start-token-id 0 --end-token-id 9999 --rank | head -n 10
100%|████████████████████████████████████████| 334/334 [01:40<00:00, 3.33it/s]
token_id unique_traits ic rank
---------- --------------- ------- ------
7495 0 42.0592 1
4873 0 40.4554 2
8854 0 40.2091 3
446 0 40.017 4
73 0 39.6501 5
8135 0 39.5842 6
8976 0 39.5072 7
4980 0 39.4849 8
Developer documentation
Read developer documentation on how to integrate with OpenRarity.
Setup and run tests locally
poetry install # install dependencies locally
poetry run pytest # run tests
Library usage
Read developer documentation for advanced library usage
Contributions guide and governance
OpenRarity is a community effort to improve rarity computation for NFTs (Non-Fungible Tokens). The core collaboration group consists of four primary contributors: Curio, icy.tools, OpenSea and Proof
OpenRarity is an open-source project and all contributions are welcome. Consider following steps when you request/propose contribution:
- Have a question? Submit it on OpenRarity GitHub discussions page
- Create GitHub issue/bug with description of the problem link
- Submit Pull Request with proposed changes
- To merge the change in the
main
branch you required to get at least 2 approvals from the project maintainer list - Always add a unit test with your changes
We use git-precommit hooks in OpenRarity repo. Install it with the following command
poetry run pre-commit install
Project Setup and Core technologies
We used the following core technologies in OpenRarity:
- Python ≥ 3.10.x
- Poetry for dependency management
- PyTest for unit tests
License
Apache 2.0 , OpenSea, ICY, Curio, PROOF
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
Hashes for open_rarity-1.0.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a81b9e8057865659afa405cfd55a33a8d8f5ef15e99244575ceb6c2cea922c5 |
|
MD5 | 33c0ba3ed8766e3911263b2bf7e315a0 |
|
BLAKE2b-256 | ccc08a436e4a6c6104f83decc399a020740d518f389fc73743dbb0f7f982775d |