FadoDB for Python
One package, two ways to the same database, and one way to use it (ADR-0101). Nothing but Python's own library is needed.
import fadodb
# A server, as the user whose key it is:
db = fadodb.connect("https://fado.acme.example", key="fado_Q329CE63C9_…")
# Or the database file itself, in this process, through the library of
# C; the program says who is calling:
db = fadodb.open("books.fado", caller={"id": "ann", "kind": "person", "groups": ["sales"]})
A command is a name and one JSON object, and its answer is one JSON
object, a dict: the commands a server
takes at POST /v1/<command>, answered the same. Ann of sales makes an
invoice, and Bob of accounting books it:
ann = db # opened as Ann above
bob = db.as_caller({"id": "bob", "kind": "person", "groups": ["accounting"]})
ann.exec("create", {"class": "Invoice", "id": "FV/2026/11/0042",
"values": {"number": "FV/2026/11/0042"}})
try:
bob.exec("transition", {"class": "Invoice", "id": "FV/2026/11/0042", "transition": "book"})
except fadodb.Refused as refusal:
print(refusal.code, refusal.hint) # guard_false the guard: NOT ISBLANK(account)
bob.exec("set", {"class": "Invoice", "id": "FV/2026/11/0042", "values": {"account": "400-01"}})
bob.exec("transition", {"class": "Invoice", "id": "FV/2026/11/0042", "transition": "book"})
A refusal is raised as fadodb.Refused: code is what a program
branches on, message and hint say why and what to send instead,
path names the member it is about, and answer is the whole answer,
with the findings of a refused definition under diagnostics.
fadodb.NoAnswer is raised when no answer came through; a command that
carries a key is then safely sent again.
as_caller is for a database in this process. Over HTTP the key says
who calls, so each user connects with their own key.
Files
The bytes of a file travel beside the commands, and its facts in them:
facts = ann.put_file(scan, name="taxi.pdf", media_type="application/pdf")
ann.exec("set", {"class": "Claim", "id": "C-7", "values": {"scan": facts}})
facts, data = bob.get_file("Claim", "C-7", facts["hash"])
The program's own actions
An action whose definition has no request is carried out by the program, in the same process: a function by the name of the action. It is called with the call, as a webhook gets it, from a thread of the worker, and returns what the action returns:
def post(call):
entry = books.post(amount=call["args"]["amount"], key=call["key"])
return {"entry": entry}
shop = fadodb.open("shop.fado", actions={"books.post": post})
raise fadodb.Permanent("the period 2026-11 is closed") refuses the
call, and the action is dead at once; any other exception is a failure,
tried again later. The call's key is the same at every attempt, so
the function makes twice once by it. Over HTTP the server carries out
the actions, and fadodb.connect takes none.
Waiting for a change
after = bob.exec("wait_for_changes", {"classes": ["Invoice"]})["after"]
while True:
heard = bob.exec("wait_for_changes", {"classes": ["Invoice"], "after": after, "seconds": 60})
for event in heard["events"]:
...
after = heard["after"]
subscribe, whose answer is a stream, is refused with not_supported:
wait_for_changes answers the same events one call at a time.
The library
fadodb.open loads the library of C: the path given as library, or
the one the variable FADODB_LIBRARY names, or the one beside the
package in fadodb/lib, or the one the system finds: libfadodb, with
DuckDB, before libfadodb-core. A database opened through libfadodb
keeps a copy of its documents in DuckDB beside its file, and the
questions that read everything, such as flow, are answered from it;
fadodb.open(path, options={"analytics": {"memory": "2GB"}}) tells it
how much it may take. scripts/library.sh build builds both into
bin/library/. A process holds one library, and opens
as many databases through it as it needs. Every call may be made from
any thread: the library lets go of Python's lock while it works.
From v0.9.0 on, every release carries the package as wheels: one for each system with
libfadodb and DuckDB's library inside, which fadodb.open finds with
nothing named, about 35 MB, and
fadodb-<version>-py3-none-any.whl for every system without it, for a
program that talks to a server. pip install takes the file of the
release. A release also publishes them on PyPI, so from v0.9.0 on
pip install fadodb takes the right one for the machine.
Its tests
The same tests run both ways: over HTTP against a fadodb-core serve
they start, with a user and a key for each caller, and in the same
process with the same callers.
make build library
FADODB_PROGRAM=bin/fadodb-core FADODB_LIBRARY=bin/libfadodb-core.so \
python3 -m unittest discover -s clients/py/tests
Metadata
Release files for fadodb 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| fadodb-0.9.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for fadodb-0.9.0-py3-none-win_amd64.whl |
| fadodb-0.9.0-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details for fadodb-0.9.0-py3-none-manylinux_2_34_x86_64.whl |
| fadodb-0.9.0-py3-none-manylinux_2_34_aarch64.whl | Python 3 | none | Linux glibc 2.34+ ARM64 | Details for fadodb-0.9.0-py3-none-manylinux_2_34_aarch64.whl |
| fadodb-0.9.0-py3-none-macosx_12_0_x86_64.whl | Python 3 | none | macOS 12.0+ x86-64 | Details for fadodb-0.9.0-py3-none-macosx_12_0_x86_64.whl |
| fadodb-0.9.0-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details for fadodb-0.9.0-py3-none-macosx_12_0_arm64.whl |
| fadodb-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for fadodb-0.9.0-py3-none-any.whl |
Total release size: 185.9 MB
Release files / fadodb-0.9.0-py3-none-win_amd64.whl
| Download URL | fadodb-0.9.0-py3-none-win_amd64.whl |
|---|---|
| Size | 26.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
575e1948d6442f00da1fbaf1de1f052e9d1461a2d07f5ef475fbbf0ac10775cc
|
|
BLAKE2b-256 checksum How to use checksums |
307041bd0bd55c11cf4fae2133713b9551b4005cd371e4c4ee69bc69f88369b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / fadodb-0.9.0-py3-none-manylinux_2_34_x86_64.whl
| Download URL | fadodb-0.9.0-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 34.6 MB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b72b759bc3ca5a0b6c685bd8b6a12b0fd14cf05c0ef7bdf0ca739f45614d6d3b
|
|
BLAKE2b-256 checksum How to use checksums |
f72f4a11ea89532389772cfd60751906a836f0d538d3536b76a3b614db7dac48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / fadodb-0.9.0-py3-none-manylinux_2_34_aarch64.whl
| Download URL | fadodb-0.9.0-py3-none-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 31.9 MB |
| Tags | Linux glibc 2.34+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
77a35f9b290d9d3ed48b0e5191456f55f587f6b5f259b8292a30e45cc61f7844
|
|
BLAKE2b-256 checksum How to use checksums |
2974b915074d939ce1641f2d131978be48db30e71f56530a86f3fdad7a23d47f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / fadodb-0.9.0-py3-none-macosx_12_0_x86_64.whl
| Download URL | fadodb-0.9.0-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 47.0 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
df73f10ba906a9139aa390481fa0e75955426c044bb508d915861f3baba5b130
|
|
BLAKE2b-256 checksum How to use checksums |
54d55fafa1d974455e9cbf0510c3fc69c49fc77a13e06433230660ac99f372ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / fadodb-0.9.0-py3-none-macosx_12_0_arm64.whl
| Download URL | fadodb-0.9.0-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 46.3 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
58adc9235abd0522ca3fb178de7ebba12df600385e78173b8b61534368dd0ec1
|
|
BLAKE2b-256 checksum How to use checksums |
aeab85c697b1664a679fbecf1581ea2a46b418673672d76dcdb56acc249d0e74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / fadodb-0.9.0-py3-none-any.whl
| Download URL | fadodb-0.9.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f442695130fb8d6526ed981726aa99d175152da5cb1b2ecd66d5cad3de792595
|
|
BLAKE2b-256 checksum How to use checksums |
8bb8b7b89e88122bee38c348b741a83e99e8f3f8b8158faa396ba161d8c2d6c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for fadodb 0.9.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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for fadodb-0.9.0-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA 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.