Skip to main content

ducpy


SQLite-backed project-state format for physical-engineering work before execution

Pip PyPI ducpy@latest release Downloads Python

The ducpy package is the official Python implementation of the .duc project-state format. It is built on top of the duc Rust crate, exposed as the ducpy_native extension. A .duc file is a gzip-compressed SQLite database — ducpy gives you both a high-level builder DSL and direct low-level access to that schema, plus parsing, serialization, and search helpers.

Installation

pip install ducpy

or with uv:

uv add ducpy

Quick start

import ducpy as duc

API overview

ducpy is organised around four conceptual entry points, matching the structure of the full API reference:

Builders API (High-level)

The easy way to build and manage .duc files. Construct elements, apply styles, manage layers, build blocks, and handle document state through the duc.builders module.

See the worked examples:

SQL Builder (Low-level)

A .duc file is a gzip-compressed SQLite database. Use duc.builders.sql_builder (DucSQL) for direct schema access, bulk queries, and low-level manipulation.

See the worked example: SQL Builder — DucSQL.new() to create a .duc from scratch, DucSQL(path) to query an existing one.

Query and search elements and files programmatically through the duc.search API.

File I/O

Read and write .duc files using the duc.parse and duc.serialize modules.

See the worked examples:

  • Parsing — parse_duc / list_external_files / streaming revision helpers.
  • Serialization — serialize_duc from builder-created elements.
  • External files — attaching binary blobs (images, PDFs) to a .duc document.

Documentation

For detailed documentation, including the full API reference, schema specification, and end-to-end examples, see:

Tools

  • Playground: Experiment with the duc format in a live environment.

Contributing

Feel free to open an issue or contact us at Ducflair Support.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Metadata

Release files for ducpy 4.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ducpy 4.2.0
File Size Uploaded Provenance Actions
ducpy-4.2.0.tar.gz 242.4 kB Without provenance Details for ducpy-4.2.0.tar.gz

Release files / ducpy-4.2.0.tar.gz

Download URL ducpy-4.2.0.tar.gz
Size 242.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0807fffc88948378bb4f6304c1e962addc024bfe4be8b129c8b0ff7b16462848
BLAKE2b-256 checksum
How to use checksums
e008d02f2467ac56978e4747df5e1248dd5f5b493303f4b78a5835672779d09d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ducpy 4.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page