obff [python]

Open Book File Format Handler for python See specs for more informations.
Example
structure
example_book
├── example.py
├── hello_world.obff
├── book_content
│ ├── cover.png
│ ├── page_1.png
│ ├── page_2.png
│ └── page_3.png
└── exported_book
Snippet Write
import obff
import os # NOT REQUIRED TO IMPORT
myBook = obff.Book()
myBook.title = "Hello World Book"
myBook.description = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
myBook.cover = obff.Cover(open("./book_content/cover.png", "rb").read())
pages = natsorted(os.listdir("./book_content"))
for page in pages:
if page.startswith("cover"):
continue
path = os.path.join("./book_content", page)
myBook.addPage(obff.Page(open(path, "rb").read()))
obff.write("./hello_world.obff", myBook)
Snippet Read
import obff
myBook = obff.read("./hello_world.obff")
print("Title: {0}".format(myBook.title))
print("Description: {0}".format(myBook.description))
myBook.cover.saveImage("./exported_book/cover.jpg")
Metadata
Release files for obff 1.0.1
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 |
|---|---|---|---|---|
| obff-1.0.1.tar.gz | 17.2 kB | Without provenance | Details for obff-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| obff-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for obff-1.0.1-py3-none-any.whl |
Total release size: 36.2 kB
Release files / obff-1.0.1.tar.gz
| Download URL | obff-1.0.1.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c707d4d117ea468aa928ecbbe5c3a75da285ecb18dd64a541496bf745b7e56c
|
|
BLAKE2b-256 checksum How to use checksums |
7c5d847ca2ed552816b111233bb4adc504f3fbc211f766cdc436a9a642365fbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Release files / obff-1.0.1-py3-none-any.whl
| Download URL | obff-1.0.1-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22633c5a7ce91b647e858e11609adf0ac929b063670693c996437f7eb41b98f1
|
|
BLAKE2b-256 checksum How to use checksums |
6ec1a12d90d5fde3eba76423a859ec0c8472c3cb85926510f8c069e90b8ba979
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Security for obff 1.0.1
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.