bsyncpy
Current BuildingSync version: 2.7.0.
Supported Python versions: 3.11, 3.12, 3.13, and 3.14.
Installing
pip install bsyncpy
Generating
poetry installpoetry run pre-commit install- Download, copy, or curl a BuildingSync schema into
bsyncpy/bsyncpycurl -L -o bsyncpy/BuildingSync-2.7.xsd https://github.com/BuildingSync/schema/releases/download/v2.7.0/BuildingSync.xsd
- cd into
bsyncpy/bsyncpy - Run generator:
poetry run python bsyncpy_generator.py BuildingSync-2.7.xsd - Go back to the root
bsyncpyand run tests:poetry run pytest - Make sure formatting is good:
poetry run pre-commit run --all-files - On commit, pre-commit should run again
Simple example
Input
from lxml import etree
from bsyncpy import bsync
# Create a root and set the version attribute
root = bsync.BuildingSync()
root.set('version', '2.7.0')
# Valid element attributes can also be passed in as kwargs
f = bsync.Facilities(bsync.Facilities.Facility(ID='Facility-1'))
# Add the facilities.facility elements to the root
root += f
# write the document to disk
with open('output.xml', 'wb+') as f:
output = etree.tostring(root.toxml(), pretty_print=True, doctype='<?xml version="1.0" encoding="UTF-8"?>')
f.write(output)
Output
<?xml version="1.0" encoding="UTF-8"?>
<BuildingSync version="2.7.0">
<Facilities>
<Facility ID="Facility-1"/>
</Facilities>
</BuildingSync>
Comprehensive example
Check out the example Jupyter notebooks in the BuildingSync schema repository: docs/notebooks.
Updating Version
- See the notes above on downloading and generating the new bsync.py file.
- Bump version in
pyproject.tomlfile - Add/update CHANGELOG entry
- Add the new release to the generator matrix in
.github/workflows/ci.yml - Update this README with the latest version of testing.
Releasing New Version
- Bump version using poetry by calling
poetry version X.Y.Z - Make sure CHANGELOG.md is up to date
- Create pull request to merge
developtomain git tag <version>. Version in the form of vX.Y.Z.git push --tags.- Go to GitHub and convert the tag to a release.
poetry buildpoetry publish. Login via pypi account.
Metadata
Release files for bsyncpy 0.4.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 | Actions |
|---|---|---|---|---|
| bsyncpy-0.4.0.tar.gz | 107.8 kB | Without provenance | Details for bsyncpy-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bsyncpy-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for bsyncpy-0.4.0-py3-none-any.whl |
Total release size: 216.5 kB
Release files / bsyncpy-0.4.0.tar.gz
| Download URL | bsyncpy-0.4.0.tar.gz |
|---|---|
| Size | 107.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aea0df2878bafcd096260730801c4da9df223918ef95d4eae88fea5994e555f
|
|
BLAKE2b-256 checksum How to use checksums |
3de915592be4df2c7094ba56f54250619693e8d195864785a484f625cd0f953b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.10.3 Darwin/25.6.0
|
Release files / bsyncpy-0.4.0-py3-none-any.whl
| Download URL | bsyncpy-0.4.0-py3-none-any.whl |
|---|---|
| Size | 108.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53812188a7b180266a9ddd2a25edc20a5816e7091d05b3b4722c3302bc2aab12
|
|
BLAKE2b-256 checksum How to use checksums |
1c27178fecf584f813a9fc77a2da5d76e3b533a68777aaac929e4892cb5a4326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.10.3 Darwin/25.6.0
|
Security for bsyncpy 0.4.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.