You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.
Search by package name:
my-package (implicit)
name:my-package (explicit)
Search by package filename:
filename:my-package.ext
Search by package tag:
tag:latest
Search by package version:
version:1.0.0
prerelease:true (prereleases)
prerelease:false (no prereleases)
Search by package architecture:
architecture:x86_64
Search by package distribution:
distribution:el
Search by package license:
license:MIT
Search by package format:
format:deb
Search by package status:
status:in_progress
Search by package file checksum:
checksum:5afba
Search by package security status:
severity:critical
Search by package vulnerabilities:
vulnerabilities:>1
vulnerabilities:<1000
Search by # of package downloads:
downloads:>8
downloads:<100
Search by package type:
type:binary
type:source
Search by package size (bytes):
size:>50000
size:<10000
Search by dependency name/version:
dependency:log4j
dependency:log4j=1.0.0
dependency:log4j>1.0.0
Search by uploaded date:
uploaded:>"1 day ago"
uploaded:<"August 14, 2022 EST"
Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY
Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true
Search by repository:
repository:repo-name
Search by last download date:
last_downloaded:<"30 days ago"
last_downloaded:>"August 14, 2022 EST"
Search queries for all Debian-specific (and related) package types
Search by component:
deb_component:unstable
Search queries for all Maven-specific (and related) package types
Search by group ID:
maven_group_id:org.apache
Search queries for all Docker-specific (and related) package types
Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)
Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)
Search queries for all Generic-specific package types
Search by file path:
generic_filepath:path/to/file.txt
Search by directory:
generic_directory:path/to
Field type modifiers (depending on the type, you can influence behaviour)
For all queries, you can use:
~foo for negation
For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching
For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal
Need a secure and centralised artifact repository to deliver Alpine,
Cargo,
CocoaPods,
Composer,
Conan,
Conda,
CRAN,
Dart,
Debian,
Docker,
Generic,
Go,
Helm,
Hex,
HuggingFace,
LuaRocks,
Maven,
npm,
NuGet,
P2,
Python,
RedHat,
Ruby,
Swift,
Terraform,
Vagrant,
VSX,
Raw & More packages?
Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.
With support for all major package formats, you can trust us to manage your software supply chain.
burocracy
0.3.2
One-liner (summary)
Description
Burocracy
Burocracy is a library that allows you to use .docx templates as templates using MailMerge fields and can save them as docx's or pdfs. It can insert plain text, images, tables and (simple) HTML. See `django-bureaucracy`_ for some mild django integration.
WIP: PPTX as templates.
Usage
Example
from bureaucracy import DocxTemplate, HTML, Image, Table
doc = DocxTemplate('examples/sample.docx')
context = {
'table': Table(data=[['this is the first cell of the first row', 'this is the second cell of the first row'],
['the second row', 'etc'],
['etc', 'etc]],
headers=['header 1', 'header 2']),
'image': Image('pigeon.jpg')
'html': HTML(<p><strong>bold</strong>-notbold</p><ul><li>hop</li><li>la</li><li>kee</li></ul>")
'text': 'some text',
}
doc.render_and_save('generated.docx', context)
doc.render_and_save('generated.pdf', context, format='pdf')
Inserting mail merge fields
Bureaucracy expects the .docx-files passed to the DocxTemplate constructor to contain MailMerge fields whose names correspond to the ones used in the context dict. How this is done exactly depends on the version of Office you have, but it seems that it's always a variation on Insert > Field > Mail Merge > Mergefield and then entering the name:
What it looks like on Office Mac 2015
Installation
pip install burocracy
Note that although this will install the pypandoc dependency, that package makes use of the pandoc executable whose installation sometimes fails. To work around this, install pandoc on it's own with your favorite package manager and make it available on the path.
For the pdf generation, bureaucracy needs the LibreOffice soffice executable to be installed and on the path.
| Status | Completed |
|---|---|
| Checksum (MD5) | f59551518a520e6b4dee41790be3fa4c |
| Checksum (SHA-1) | 144dd4f4d76adabd77d161ed6ddbbb61ac17d72e |
| Checksum (SHA-256) | e3aac09ad2bde6490d2b70132c1c5789a13973e0aaab3a6096d92813004d2a3d |
| Checksum (SHA-512) | f172685ad7d0ee8f5a73a2152e2f20a8e324c1bab3086cb7b7ab7e230a0d8df409… |
| GPG Signature | |
| GPG Fingerprint | 6811684bac0b8895434e97bdd4391b8fb999e537 |
| Storage Region | Dublin, Ireland |
| Type | Binary (contains binaries and binary artifacts) |
| Uploaded At | 4 months, 2 weeks ago |
| Uploaded By |
|
| Slug Id | burocracy-032-py3-none-anywhl-o0wc |
| Unique Id | XxPKvup3bbvv93zc |
| Version (Raw) | 0.3.2 |
| Version (Parsed) |
|
| extended metadata | |
| Author | Unset |
| Classifiers | Development Status :: 3 - Alpha | Environment :: Web Environment | Intended Audience :: Developers | Operating System :: OS Independent | Programming Language :: Python | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.4 | Programming Language :: Python :: 3.5 | Topic :: Internet :: WWW/HTTP | Topic :: Internet :: WWW/HTTP :: Dynamic Content |
| Metadata Version | 2.0 |
| Py Filetype | bdist_wheel |
| Py Version | py3 |
| Requires Dist | pypandoc | python-docx | python-pptx (>=0.6.2) |
| pkg | burocracy-0.3.2-py3-none-any.whl |
4
17.8 KB |
md5 | sha1 | sha256 | sha512 |
This package has 26 files/directories.
Last scanned
4 months, 2 weeks ago
Scan result
Clean
Vulnerability count
0
Max. severity
UnknownPackage statistics are no longer available on cloudsmith.io. Please visit our new web app to access this feature.
You can embed a badge in another website that shows this or the latest version of this package.
To embed the badge for this specific package version, use the following:
[](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/)
|This version of 'burocracy' @ Cloudsmith|
.. |This version of 'burocracy' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true
:target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/",title="This version of 'burocracy' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/0.3.2/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true" alt="This version of 'burocracy' @ Cloudsmith" /></a>
rendered as:
To embed the badge for the latest package version, use the following:
[](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/)
|Latest version of 'burocracy' @ Cloudsmith|
.. |Latest version of 'burocracy' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true&show_latest=true
:target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true&show_latest=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/",title="Latest version of 'burocracy' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/burocracy/latest/a=noarch;xf=bdist_wheel;xn=burocracy;xv=py3/?render=true&show_latest=true" alt="Latest version of 'burocracy' @ Cloudsmith" /></a>
rendered as:
These instructions assume you have setup the repository first (or read it).
To install/use burocracy @ version 0.3.2 ...
pip install 'burocracy==0.3.2'
You can also install the latest version of this package:
pip install --upgrade 'burocracy'
If necessary, you can specify the repository directly:
pip install \
--index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/ \
burocracy==0.3.2
If you've got a project requirements.txt file, you can specify this as a dependency:
--index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
burocracy==0.3.2
In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:
--extra-index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
burocracy==0.3.2