Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.1 instead.
Reason given by maintainers: found problems on Ubuntu with dependencies not installing correctly

kglab

GitHub commit activity

The kglab library provides a simple abstraction layer in Python for building knowledge graphs.

Welcome to graph-based data science: https://derwen.ai/docs/kgl/

SPECIAL REQUEST: Which features would you like in an open source Python library for building knowledge graphs?
Please add your suggestions through this survey:
https://forms.gle/FMHgtmxHYWocprMn6
This will help us prioritize the roadmap for kglab.

Getting Started

See the "Getting Started" section of the online documentation.

To install from PyPi:

pip install kglab

If you work directly from this Git repo, be sure to install the dependencies as well:

pip install -r requirements.txt

Then to use the library with some simple use cases:

import kglab

# create a KnowledgeGraph object
kg = kglab.KnowledgeGraph()

# load RDF from a URL
kg.load_rdf("http://bigasterisk.com/foaf.rdf", format="xml")

# measure the graph
measure = kglab.Measure()
measure.measure_graph(kg)

print("edges: {}\n".format(measure.edge_count))
print("nodes: {}\n".format(measure.node_count))

# serialize as a string in "Turtle" TTL format
ttl = kg.save_rdf_text()
print("```")
print(ttl[:999])
print("```")

See the tutorial notebooks in the examples subdirectory for sample code and patterns to use in integrating kglab with other graph libraries in Python: https://derwen.ai/docs/kgl/tutorial/

Build Instructions

Note: most use cases won't need to build this package locally. Instead, simply install from PyPi or Conda.

To set up the build environment locally, see the "Build Instructions" section of the online documentation.

illustration of a knowledge graph, plus laboratory glassware

License and Copyright

Source code for kglab plus its logo, documentation, and examples have an MIT license which is succinct and simplifies use in commercial applications.

All materials herein are Copyright (c) 2020-2021 Derwen, Inc.

Attribution

Please use the following BibTeX entry for citing kglab if you use it in your research or software. Citations are helpful for the continued development and maintenance of this library.

@software{kglab,
  author = {Paco Nathan},
  title = {{kglab: a simple abstraction layer in Python for building knowledge graphs}},
  year = 2020,
  publisher = {Derwen},
  url = {https://github.com/DerwenAI/kglab}
}

Kudos

Many thanks to our contributors: @ceteri, @jake-aft, @dmoore247, plus general support from Derwen, Inc. and The Knowledge Graph Conference.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kglab-0.1.5.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kglab-0.1.5-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file kglab-0.1.5.tar.gz.

File metadata

  • Download URL: kglab-0.1.5.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for kglab-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0f651eb79b6da45324dc2a2f38f132e032e1e6c38380b29e36842632bfa6f87a
MD5 44e2ba3468ee2ec2dd089e6cefb70d09
BLAKE2b-256 5cc3d03d7defd452fc1317b13ecb696604395800f50b460a15948ab221382108

See more details on using hashes here.

File details

Details for the file kglab-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: kglab-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for kglab-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b35bd27dd48d7b506b9a9b4a6fd8e02e12b8c5cb01fcf9533a57a096fbad0d84
MD5 26406f29b57d9544d5efe042a2b44774
BLAKE2b-256 c1302e4dcb99492a33d71681b27700c672d65e3d29705898067908bc28886946

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page