SADI for Python - Semantic Automated Discovery and Integration framework
Project description
SADI Python
SADI (Semantic Automated Discovery and Integration) is a framework for creating semantic web services that consume and produce RDF data. This is the Python implementation of SADI.
Features
- 🐍 Python 3.8-3.12 Support: Fully compatible with modern Python versions
- 🔧 Easy Service Creation: Simple decorators and classes for creating SADI services
- 📊 RDF Processing: Built-in support for RDF data serialization and deserialization
- 🌐 Multiple Formats: Support for Turtle, RDF/XML, JSON-LD, and RDFa
- ⚡ Asynchronous Support: Built-in support for async service operations
- 🧪 Comprehensive Testing: Full test suite covering all SADI functionality
Installation
From PyPI (recommended)
pip install sadi
From Source
git clone https://github.com/jpmccu/sadi.git
cd sadi/python/sadi.python
pip install -e .
Quick Start
Creating a Simple SADI Service
from sadi import sadi
@sadi.service(
name="ExampleService",
description="An example SADI service",
inputClass="http://example.org/Input",
outputClass="http://example.org/Output"
)
def example_service(input_graph, output_graph):
# Process RDF data
for subject in input_graph.subjects():
output_graph.add((subject, URIRef("http://example.org/processed"), Literal("true")))
return output_graph
if __name__ == '__main__':
sadi.run(example_service)
Using SADI Client
from sadi.client import SADIClient
client = SADIClient()
result = client.call_service("http://example.org/service", input_data)
Testing
This package includes a comprehensive test suite covering all SADI functionality:
# Run all tests
python run_tests.py
# Run compatibility tests only (no dependencies required)
python test_compatibility.py
# Run with make (if available)
make test
Development
Setting up Development Environment
# Clone the repository
git clone https://github.com/jpmccu/sadi.git
cd sadi/python/sadi.python
# Install in development mode
pip install -e .[dev]
# Run tests
make test
# Format code
make format
# Check code quality
make lint
Available Make Commands
make install- Install packagemake install-dev- Install with development dependenciesmake test- Run all testsmake lint- Run code lintingmake format- Format code with black and isortmake build- Build package distributionsmake clean- Clean build artifacts
Python 3.12 Compatibility
This package has been updated for full Python 3.12 compatibility. Key changes include:
- ✅ Removed deprecated
buffer()function calls - ✅ Eliminated Python 2/3 compatibility libraries
- ✅ Updated
basestringusage tostr - ✅ Comprehensive test coverage for compatibility
See PYTHON312_COMPATIBILITY.md for detailed information.
Testing Documentation
For comprehensive testing information, see TESTING.md.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add/update tests as needed
- Run the test suite:
make test - Submit a pull request
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Support
- Python Versions: 3.8, 3.9, 3.10, 3.11, 3.12
- Documentation: SADI Documentation
- Issues: GitHub Issues
Links
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sadi-1.0.0.tar.gz.
File metadata
- Download URL: sadi-1.0.0.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0914613170a0b819be89eb534c2327694be8404bb066442db4757b6404d1c339
|
|
| MD5 |
b7cc673c654f34785e0f42f424bd4eba
|
|
| BLAKE2b-256 |
5037523984b934477a330e013592167f6528678357f27b5852b62d09fca94168
|
File details
Details for the file sadi-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sadi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f4aa495307d76a1d214407c5c6e2bb5c65a224616c97820a00ef0f63003e10a
|
|
| MD5 |
5c18519dc3ba47be8abca7bb75ac15c5
|
|
| BLAKE2b-256 |
a2538d1d0ed02c8e98d2518179e4bd0d718589d8d66e4e9860dfe6eeb3f53f1a
|