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 BuilderDucSQL.new() to create a .duc from scratch, DucSQL(path) to query an existing one.

Search

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:

  • Parsingparse_duc / list_external_files / streaming revision helpers.
  • Serializationserialize_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.

Download files

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

Source Distribution

ducpy-4.0.3.tar.gz (412.0 kB view details)

Uploaded Source

File details

Details for the file ducpy-4.0.3.tar.gz.

File metadata

  • Download URL: ducpy-4.0.3.tar.gz
  • Upload date:
  • Size: 412.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

File hashes

Hashes for ducpy-4.0.3.tar.gz
Algorithm Hash digest
SHA256 04459e3552863ebff9ecdcb541e0d81b99c69687ae2b63154cfcff7d1496ef84
MD5 30a1d67648b6e035e2d3e57b2f87c1c3
BLAKE2b-256 42f5644ecd379c65ae1f8246de2a1e6d3ffcbcaede4e5a716ed39a889d774d1c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.0.3 This release

1 file

4.0.2

1 file

4.0.1

1 file

4.0.0

1 file

3.6.1

1 file

3.6.0

1 file

3.5.1

1 file

3.5.0

1 file

3.4.0

1 file

3.3.8

1 file

3.3.7

1 file

3.3.6

1 file

3.3.5

1 file

3.3.4

1 file

3.3.3

1 file

3.3.2

1 file

3.3.1

1 file

3.3.0

1 file

3.2.3

1 file

3.2.2

1 file

3.2.1

1 file

3.2.0

1 file

3.1.1

1 file

3.1.0

1 file

3.0.5

1 file

3.0.4

1 file

3.0.3

1 file

3.0.2

1 file

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.17.1

2 files

1.17.0

2 files

1.16.5

2 files

1.16.4

2 files

1.16.3

2 files

1.16.2

2 files

1.16.1

2 files

1.16.0

2 files

1.0.0

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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