Skip to main content

ACadSharp.Python

Python access to the complete public object model of ACadSharp, with DXF/DWG readers and writers, entities, tables, blocks, objects, geometry, collections, enums and events. The managed backend uses Python.NET to expose the actual .NET types and preserve their behavior. ACadSharp is pinned as a recursive Git submodule.

python -m pip install 'acadsharp[managed]'

Install the .NET 10 runtime for your Python architecture first. Python 3.11 or newer is required. The wheel includes ACadSharp itself; a .NET SDK is needed only to build from source.

from acadsharp import CadDocument, XYZ
from acadsharp.entities import Line, Circle
from acadsharp.io import DxfWriter, DxfReader

cad = CadDocument()
line = Line(XYZ(0, 0, 0), XYZ(100, 50, 0))
cad.Entities.Add(line)

circle = Circle()
circle.Center = XYZ(50, 25, 0)
circle.Radius = 10
cad.Entities.Add(circle)

DxfWriter.Write("drawing.dxf", cad)
restored = DxfReader.Read("drawing.dxf")
for entity in restored.Entities:
    print(entity.ObjectName, entity.Handle)

The public .NET spelling remains intact: StartPoint, Layers, Add, and Read work as in ACadSharp. Original ACadSharp, CSMath, and CSUtilities namespaces are available after acadsharp.load(). Nested types and generics are available too; the generated reference inventories every exported type and its declared public members. Three span-returning color operations use compiled Python adapters, preserving their original behavior as Python bytes.

An optional Native AOT backend runs through ctypes without Python.NET or an installed .NET runtime. It provides its own documented operation set; it does not expose the entire managed object model. See the native backend guide for supported operations, builds, platforms and limitations.

Native wheels for 0.1.0 target Linux x64/Arm64, macOS Arm64 (Apple Silicon), and Windows x64. Intel Mac users can use the managed backend or build the native library locally with --rid osx-x64.

Development

git clone --recurse-submodules https://github.com/wieslawsoltes/ACadSharp.Python.git
cd ACadSharp.Python
python -m venv .venv
# POSIX: source .venv/bin/activate
# PowerShell: .venv\Scripts\Activate.ps1
python -m pip install -e '.[dev,docs]'
python scripts/build_managed.py
python scripts/generate_api.py
python -m pytest
python -m mkdocs build --strict
python -m build

See CONTRIBUTING.md for the native build and upstream update workflow. Format compatibility and unimplemented CAD features follow the pinned upstream library; full access to its public API does not imply support for every DWG/DXF feature.

License

MIT. Bundled ACadSharp, CSMath, and CSUtilities retain their upstream notices; see THIRD_PARTY_NOTICES.md.

Metadata

Release files for acadsharp 0.1.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 acadsharp 0.1.0
File Size Uploaded Provenance
acadsharp-0.1.0.tar.gz 1.2 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for acadsharp 0.1.0
File Interpreter ABI Platform
acadsharp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / acadsharp-0.1.0.tar.gz

Download URL acadsharp-0.1.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
10df8579aff80dfceda6bb23439f3d1e268697e64d6953b07e1f1bf72ef100c2
BLAKE2b-256 checksum
How to use checksums
e9ac4a9a8831d70eaad57ac4ee83c5246b0bd8e10fd29a415aaffbfef5a7b682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / acadsharp-0.1.0-py3-none-any.whl

Download URL acadsharp-0.1.0-py3-none-any.whl
Size 886.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
162bfb80dfda6d85db2cf67e31c5fec48eac4e04bb02219fa7cbc768676a05f8
BLAKE2b-256 checksum
How to use checksums
e9bcb83ad7e36f7108cf61fb1d94f2fcdcefa8587436e4946367dd9ed11cad9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for acadsharp 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for acadsharp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

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

0.1.0 This release

2 release files Full 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