Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rudof Python bindings
The Python bindings for rudof are called pyrudof. They are available at pypi.
For more information, you can access the readthedocs documentation. We keep several tutorials about rudof as Jupyter notebooks in: [https://rudof-project.github.io/tutorials].
After compiling and installing this module, a Python library called pyrudof should be available.
Build the development version
This module is based on pyo3 and maturin.
To build and install the development version of pyrudof you need to clone this git repository, go to the python directory (the one this README is in) and run:
pip install maturin
followed by:
If you are using .env, you can do the following:
followed by:
or
and once you do that, you can locally install que package as:
Running the tests
Go to the tests folder:
and run:
Using rudof_generate
The pyrudof package includes bindings for rudof_generate, which allows you to generate synthetic RDF data from ShEx or SHACL schemas.
Basic Example
# Create configuration
=
# Create generator
=
# Load schema and generate data
Configuration Options
The GeneratorConfig class provides many configuration options:
=
# Generation parameters
# Number of entities to generate
# Random seed for reproducibility
# Schema format
# or SchemaFormat.SHACL
# Output configuration
# or OutputFormat.NTriples
# Whether to compress output
# Write generation statistics
# Cardinality strategy
# Options: Minimum, Maximum, Random, Balanced
# Parallel processing
# Number of worker threads
# Batch size for processing
# Enable parallel file writing
# Number of output files (when parallel)
Loading Schemas
You can load schemas in different ways:
# Load ShEx schema
# Load SHACL schema
# Auto-detect schema format
# Then generate data
Complete Workflow
The run() method provides a convenient way to load a schema and generate data in one step:
# Auto-detect format
# Specify format explicitly
Configuration Files
You can also load configuration from TOML or JSON files:
# Load from TOML
=
# Load from JSON
=
# Save configuration
Available Enums
- SchemaFormat:
ShEx,SHACL - OutputFormat:
Turtle,NTriples - CardinalityStrategy:
Minimum,Maximum,Random,Balanced
For more examples, see the examples/generate_example.py file.