Skip to main content

Python library for interacting with the OriginTrail Decentralized Knowledge Graph

Project description



Python SDK Banner

dkg.py

Python SDK for interacting with the OriginTrail Decentralized Knowledge Graph
OriginTrail Docs · View Demo · Report Bug · Request Feature

Table of Contents
  1. 📚 About The Project
  2. 🚀 Getting Started
  3. 📄 License
  4. 🤝 Contributing
  5. ❤️ Contributors
  6. 🌟 Acknowledgements
  7. 📰 Social Media


📚 About The Project

What is the Decentralized Knowledge Graph?


Knowledge Asset

OriginTrail Decentralized Knowledge Graph (DKG), hosted on the OriginTrail Decentralized Network (ODN) as trusted knowledge infrastructure, is shared global Knowledge Graph of Knowledge Assets. Running on the basis of the permissionless multi-chain OriginTrail protocol, it combines blockchains and knowledge graph technology to enable trusted AI applications based on key W3C standards.

The OriginTrail DKG Architecture


The OriginTrail tech stack is a three layer structure, consisting of the multi-chain consensus layer (OriginTrail layer 1, running on multiple blockchains), the Decentralized Knowledge Graph layer (OriginTrail Layer 2, hosted on the ODN) and Trusted Knowledge applications in the application layer.

DKG Architecture

Further, the architecture differentiates between the public, replicated knowledge graph shared by all network nodes according to the protocol, and private Knowledge graphs hosted separately by each of the OriginTrail nodes.

Anyone can run an OriginTrail node and become part of the ODN, contributing to the network capacity and hosting the OriginTrail DKG. The OriginTrail node is the ultimate data service for data and knowledge intensive Web3 applications and is used as the key backbone for trusted AI applications (see https://chatdkg.ai)

What is a Knowledge Asset?


Knowledge Asset

Knowledge Asset is the new, AI‑ready resource for the Internet

Knowledge Assets are verifiable containers of structured knowledge that live on the OriginTrail DKG and provide:

  • Discoverability - UAL is the new URL. Uniform Asset Locators (UALs, based on the W3C Decentralized Identifiers) are a new Web3 knowledge identifier (extensions of the Uniform Resource Locators - URLs) which identify a specific piece of knowledge and make it easy to find and connect with other Knowledge Assets.
  • Ownership - NFTs enable ownership. Each Knowledge Asset contains an NFT token that enables ownership, knowledge asset administration and market mechanisms.
  • Verifiability - On-chain information origin and verifiable trail. The blockchain tech increases trust, security, transparency, and the traceability of information.

By their nature, Knowledge Assets are semantic resources (following the W3C Semantic Web set of standards), and through their symbolic representations inherently AI ready. See more at https://chatdkg.ai

Discover Knowledge Assets with the DKG Explorer:

Knowledge Assets Graph 1
Supply Chains
Knowledge Assets Graph 2
Construction
Knowledge Assets Graph 3
Life sciences and healthcare
Knowledge Assets Graph 3
Metaverse

(back to top)


🚀 Getting Started


Prerequisites

  • python >=3.10
  • poetry >=1.5.1

In order to use in the local environment, make sure to run the local DKG network.



Installation

Create virtual environment (you can choose any existing folder this command will create configurations and virtual env for python):

python3 -m venv /path/to/folder

Inside of previously generated folder you will find activate script in bin folder and run it:

source /path/to/folder/bin/activate

Install dependencies:

poetry install

Now you can run a demo example file (you need to have the local DKG network running):

python3 examples/demo.py

(back to top)

📄 License

Distributed under the Apache-2.0 License. See LICENSE file for more information.


(back to top)

🤝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

❤️ Thanks to all Contributors!


(back to top)

🌟 Acknowledgements


(back to top)

📰 Social Media



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

dkg-8.0.0a2.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

dkg-8.0.0a2-py3-none-any.whl (67.4 kB view details)

Uploaded Python 3

File details

Details for the file dkg-8.0.0a2.tar.gz.

File metadata

  • Download URL: dkg-8.0.0a2.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.0.0

File hashes

Hashes for dkg-8.0.0a2.tar.gz
Algorithm Hash digest
SHA256 f4ffdcfd8af595564f62abf6e4f58037819e9e9634243a94f0f42348ebbb396a
MD5 911bea953451fff685ecccc8fde8a7b7
BLAKE2b-256 c7a413baf513649514f7634d4ed13b9619495b2425dbf624611f79bfa0594e19

See more details on using hashes here.

File details

Details for the file dkg-8.0.0a2-py3-none-any.whl.

File metadata

  • Download URL: dkg-8.0.0a2-py3-none-any.whl
  • Upload date:
  • Size: 67.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.0.0

File hashes

Hashes for dkg-8.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dea3f871778b053e68ee07c990bf2e466e5f9f7c568160b17d29da9e282f1a3
MD5 3835514cf56e3e16f3f53d10a1f5049f
BLAKE2b-256 2dbb99ca628274f7978c9288dc35f8e5412c3b37a9e78a60ac36a9256345343e

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