|Stefano Cossu dd3fa57548 Remove redundant store type check.||4 days ago|
|bin||3 weeks ago|
|cpython||5 days ago|
|docs||1 week ago|
|ext||6 days ago|
|include||6 days ago|
|src||4 days ago|
|test||3 weeks ago|
|.gitignore||3 weeks ago|
|.gitmodules||1 week ago|
|CODE_OF_CONDUCT||1 year ago|
|Doxyfile||2 months ago|
|LICENSE||6 days ago|
|MANIFEST.in||3 weeks ago|
|Makefile||1 week ago|
|README.md||6 days ago|
|TODO.md||3 weeks ago|
|profile.c||1 month ago|
|pyproject.toml||3 weeks ago|
|setup.py||6 days ago|
|test.c||1 month ago|
|valgrind-python.supp||1 year ago|
This project is work in progress.
Embedded RDF (and maybe later, generic graph) store and manipulation library.
The goal of this library is to provide efficient and compact handling of RDF data. At least a complete C API and Python bindings are planned.
This library can be thought of as SQLite or BerkeleyDB for graphs. It can be
embedded directly in a program and store persistent data without the need of
running a server. In addition,
lsup_rdf can perform in-memory graph
operations such as validation, de/serialization, boolean operations, lookup,
Two graph back ends are available: a memory one based on hash maps and a disk-based one based on LMDB, an extremely fast and compact embedded key-store value. Graphs can be created independently with either back end within the same program. Triples in the persistent back end are fully indexed and optimized for a balance of lookup speed, data compactness, and write performance (in order of importance).
This library was initially meant to replace RDFLib dependency and Cython code in Lakesuperior in an effort to reduce code clutter and speed up RDF handling; it is now a project for an independent RDF library, but unless the contributor base expands, it will remain focused on serving Lakesuperior.
Alpha. The API structure is not yet stable and may change radically. The code may not compile, or throw a fit when run. Testing is minimal. At the moment this project is only intended for curious developers and researchers.
This is also my first stab at writing a C library (coming from Python) and an unpaid fun project, so don't be surprised if you find some gross stuff.
The short-term goal is to support usage in Lakesuperior and a workable set of features as a standalone library:
(Unless provided and maintained by external contributors)
make command compiles the library. Enter
make help to get an
overview of the other available commands.
make install installs libraries and headers in the directories set by the
$PREFIX. If this is unset, the default
prefix is used.
Options to compile with debug symbols are available.
DEBUG: Set debug mode: memory map is at reduced size, logging is forced to
TRACE level, etc.
LSUP_RDF_STREAM_CHUNK_SIZE: Size of RDF decoding buffer, i.e., maximum size
of a chunk of RDF data fed to the parser when decoding a RDF file into a graph.
This should be larger than the maximum expected size of a single term in your
RDF source. The default value is 8192, which is mildly conservative. If you
experience parsing errors on decoding, and they happen to be on a term such a
very long string literal, try recompiling the library with a larger value.
liblsuprdf.a libraries can be linked
dynamically or statically to your code. Only the
lsup_rdf.h header, which
recursively includes other headers in the
include directory, needs to be
#included in the embedding code.
Environment variables and/or compiler options might have to be set in order to find the dynamic libraries and headers in their install locations.
For compilation and linking examples, refer to
and other actions in the current Makefile.
LSUP_MDB_STORE_PATH: The file path for the persistent store back end. For
production use it is strongly recommended to set this to a permanent location
on the fastest storage volume available. If unset, the current directory will
be used. The directory must exist.
LSUP_LOGLEVEL: A number between 0 and 5, corresponding to:
If unspecified, it is set to 3.
LSUP_MDB_MAPSIZE Virtual memory map size. It is recommended to leave this
alone. By default, it is set to 1Tb for 64-bit systems and 4Gb for 32-bit
systems. The map size by itself does not use up any extra resources.
Almost all header files are documented. Run
Doxygen) to generate HTML documentation in