Unlock manufacturing intelligence from technical drawings with AI.
- Overview
- Why Werk24?
- Features
- Applications
- Installation
- Dependency Management
- Quick Start
- Documentation
- Community & Support
- Contributing
- License
Werk24 provides AI-powered solutions for extracting and interpreting technical drawings. This Python client enables easy interaction with the Werk24 API for processing technical drawings efficiently. The API gives you access to the following structured data:
- Meta Data: Drawing ID, Part ID, Designation, General Tolerances, General Roughness, Material, Weight, Bill of Material (incl. Fasteners), Revision Table, Languages and Notes.
- Features: Dimensions incl. Tolerances, Threads, Bores, Chamfers, Roughnesses, GDnTs, Radii, Undercuts, Key Slots, Center Holes, Fasteners.
- Insights: Manufacturing Method, Postprocesses, Input Geometry, Output Geometry.
- Redaction: Redact information from Technical Drawings.
๐ Visit werk24.io to learn more or request a demo.
- Accelerate Quoting โ Generate prices from 2D drawings in seconds.
- Reduce Manual Entry โ Automatically capture metadata and dimensions.
- Speed Up Supplier Scouting โ Match drawings with capable vendors.
- Protect IP โ Anonymize sensitive details before sharing.
- Boost Productivity โ Let engineers focus on design, not data extraction.
- Automated Extraction: Retrieve metadata, dimensions, and annotations from technical drawings.
- Fast Processing: Optimized API calls for efficient inference.
- Seamless Integration: Works with Python-based workflows for manufacturing, CAD, and ERP systems.
- JSON Output: Standardized response format for easy processing.
Harness Werk24 for:
- Instant Pricing: Automate 2D drawing-based quoting.
- Feasibility Checks: Evaluate RFQs efficiently.
- Configurator Auto-Fill: Populate online configurators with minimal input.
- Drawing Anonymization: Protect sensitive data in technical drawings.
- Supplier Scouting: Automate vendor selection for specific requirements.
- ERP Registration: Streamline incoming RFQ registrations.
- Structured Archiving: Organize drawings with metadata extraction.
Pip installation
pip install werk24 # install the library
werk24 init # paste your API token; it is saved to ~/.werk24 and found from any folderCalling the API needs an API token and is billed pay as you go. Sign up for the Werk24 API, then create a token on the API tokens page of the Werk24 console. werk24 init asks for the token and stores it for the client. On a server or in CI, set the W24TECHREAD_AUTH_TOKEN environment variable instead.
To see what Werk24 reads from a drawing before you sign up, try the free browser demo.
To let the CLI show the sheet and view images it receives (werk24 techread --ask-sheet-images / --ask-view-images), install the images extra, which adds Pillow:
pip install "werk24[images]"Without it, those options do not show the images and still print the other results.
The client uses the first token it finds, in this order:
- The
tokenargument:Werk24Client(token="..."). .werk24in the folder the script is started from.~/.werk24in your home folder. This is wherewerk24 initsaves the token.werk24_license.txtin the folder the script is started from.~/werk24_license.txtin your home folder.- The environment variable
W24TECHREAD_AUTH_TOKEN.
The environment variable suits CI jobs and containers, where no token file
exists. On a machine that has a token file, the file is used instead. When no
token is found, the error lists every place the client looked. werk24 health-check shows which token is in use and where it was read from.
The werk24 library uses a flexible dependency management strategy designed to minimize conflicts with other packages in your environment. We specify minimum versions for dependencies based on required features and security fixes, but avoid restrictive upper bounds that can cause installation conflicts.
Each minimum version requirement exists for a specific reason:
- Security Fixes: Dependencies like
cryptography>=44.0.0require minimum versions that include critical security patches - Required Features: Some dependencies introduced features we rely on in specific versions
- API Stability: Minimum versions ensure the APIs we use are available and stable
We follow these principles:
- Trust Semantic Versioning: For dependencies that follow SemVer, we trust that minor and patch updates won't break compatibility
- No Restrictive Upper Bounds: We avoid upper bounds (like
<=X.Y.Z) on stable dependencies to prevent blocking your other packages - Surgical Exclusions: If a specific version has issues, we exclude only that version using
!=X.Y.Zrather than blocking all future versions - Tested Configurations: We maintain
requirements.txtwith exact versions we've tested, but your environment can use compatible newer versions
If you encounter dependency conflicts during installation:
- Check Your Environment: Use
pip listto see what's already installed - Update pip: Ensure you're using a recent version:
pip install --upgrade pip - Use Virtual Environments: Always install in a clean virtual environment to avoid conflicts
- Review Conflict Messages: pip will show which packages have incompatible requirements
- Report Issues: If werk24's requirements conflict with popular packages, please open an issue
Installing alongside other packages:
# werk24 works well with other packages
pip install werk24 requests pandas numpyUpgrading from older versions:
# Simply upgrade to the latest version
pip install --upgrade werk24Checking installed versions:
# See what versions are actually installed
pip show werk24
pip list | grep -E "(cryptography|pydantic|websockets)"Here's how you can use the Werk24 client to extract data from a technical drawing:
import asyncio
from werk24 import AskMetaData, TechreadMessageType, Werk24Client, get_test_drawing
async def main():
with get_test_drawing() as drawing:
async with Werk24Client() as client:
async for message in client.read_drawing(drawing, [AskMetaData()]):
if message.message_type == TechreadMessageType.ASK:
print(message.model_dump_json(
include={"message_subtype", "payload_dict"}, indent=2
))
asyncio.run(main())In a Jupyter notebook a cell already runs an event loop, so asyncio.run(main())
raises RuntimeError: asyncio.run() cannot be called from a running event loop.
Run await main() in the cell instead.
Without async. read_drawing_sync reads the drawing and returns the answers
(the ASK messages) as a list:
from werk24 import AskMetaData, get_test_drawing, read_drawing_sync
with get_test_drawing() as drawing:
for message in read_drawing_sync(drawing, [AskMetaData()]):
print(message.model_dump_json(include={"message_subtype", "payload_dict"}, indent=2))See v2.docs.werk24.io.
To get a first impression, you can run the CLI:
$> werk24 --help
Usage: python -m werk24.cli.werk24 [OPTIONS] COMMAND [ARGS]...
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --log-level TEXT Set the log level [default: WARNING] โ
โ --install-completion Install completion for the current shell. โ
โ --show-completion Show completion for the current shell, to copy it or... |
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ init Set up Werk24 with your API token. โ
โ health-check Run a comprehensive health check for the CLI. โ
โ techread Read a drawing file and extract information. โ
โ version Print the version of the Client. โ
โ status Fetch and display the Werk24 system status. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
werk24 techread reads a drawing and prints one JSON object per line on stdout for every message that answers an ask. Each object has the fields of TechreadMessage (request_id, message_type, message_subtype, page_number, payload_dict, payload_url, exceptions). Binary results such as sheet images or the redacted file are not inlined; download them from payload_url.
werk24 techread drawing.pdf --ask-meta-data | jq .
werk24 techread drawing.pdf --ask-meta-data --ask-redaction --prettyAsks: --ask-balloons, --ask-custom <custom_id>, --ask-document-profile, --ask-features, --ask-insights, --ask-meta-data, --ask-page-assessment, --ask-redaction, --ask-reference-positions, --ask-sheet-images, --ask-view-images. --pretty indents each object. --ask-sheet-images and --ask-view-images also open each image in the default image viewer, which needs Pillow from the images extra (pip install "werk24[images]"). Without Pillow, a read that asks for anything else as well warns once, does not show the images and prints every result; a read that asks only for images stops before it starts.
Exceptions reported by the server are written to stderr, one line each. The exit status is 0 when every ask was answered without an ERROR-level exception. It is 1 when an ask failed, when the read ended before the server reported it complete, or when the client raised an error. It is 2 for a usage error such as an unknown option.
- Website: werk24.io
- Email: info@werk24.io
- LinkedIn: Werk24
Have questions? Request a demo or open an issue and weโll be happy to help.
We welcome contributions that improve the client or documentation.
- Fork the repository and create a new branch.
- Make your changes and ensure tests pass with
pytest. - Open a pull request describing your changes.
See CONTRIBUTING.md for more details.
The Werk24 Python Client requires a commercial Werk24 license to use. See LICENSE.txt for terms and conditions.