uploadkit-office
Office document validators, policies, and metadata for UploadKit.
What problem does this solve?
OOXML/ODF structure and security checks (macros, external links, embeds) that
plug into UploadPolicy.validators without modifying UploadKit Core.
When to use it
Use for DOCX, XLSX, PPTX, ODT, and ODS uploads that must stay macro-free by default.
When not to use it
- Do not edit or convert office documents here.
- Do not put generic MIME/filename checks here (see
uploadkit-security).
Installation
Requires Python 3.10+. No extra native dependencies (stdlib zipfile + XML).
pip install uploadkit-office
Quick Start
from uploadkit import Uploader
from uploadkit_office import DocxPolicy, OfficePolicy, OfficeKind
uploader = Uploader(DocxPolicy(max_size=10 * 1024 * 1024), storage=my_storage)
# Or allow multiple kinds:
policy = OfficePolicy(kinds=frozenset({OfficeKind.DOCX, OfficeKind.XLSX}))
Public API
| Symbol | Kind |
|---|---|
OfficePolicy / DocxPolicy / XlsxPolicy / PptxPolicy |
Public |
OfficeKind / OfficeMetadata / inspect_office |
Public |
OfficeStructureValidator / OfficeSecurityValidator / OfficeSheetLimitValidator |
Public |
default_office_validators / default_async_office_validators |
Public |
| Async validator equivalents | Public |
Coverage
The coverage badge is a measured total from
coverage report --include='src/*', not an aspirational 100%. CI enforces
--fail-under=80.
Most of the remaining gap is defensive and format-variant code in metadata.py
(edge-case ZIP/ODF parsing, zip-bomb heuristics). Validators and policies are
fully covered. Unlike Core / framework adapters, this package does not claim
100% yet — fixtures for those branches are welcome.
Changelog
See CHANGELOG.md.
Contributing
See CONTRIBUTING.md.
Metadata
Release files for uploadkit-office 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uploadkit_office-0.1.0.tar.gz | 14.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uploadkit_office-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.1 kB
Release files / uploadkit_office-0.1.0.tar.gz
| Download URL | uploadkit_office-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc5c86920b20da1a91844e576b0f31a8a1d49ad5a928a468a5e3ec1bcb960a8d
|
|
BLAKE2b-256 checksum How to use checksums |
b5dcad9342d83bec574540e9828245c0bc4406b06d995be8bae8fc1e90446d6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / uploadkit_office-0.1.0-py3-none-any.whl
| Download URL | uploadkit_office-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b9ae49e7c5eb505aec1893c678688b7f0e840b6bd8af1b8140f629abcdd8c53
|
|
BLAKE2b-256 checksum How to use checksums |
3eee2ae922fdfa621d92f0c569498ad53cc91d38ae98f7d902c95e1cf1166db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for uploadkit-office 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.
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.