python-fmrest
python-fmrest is a wrapper around the FileMaker Data API.
No need to worry about manually requesting access tokens, setting the right http headers, parsing responses, ...
Quick example:
>>> fms = fmrest.Server('https://your-server.com',
user='admin',
password='admin',
database='Contacts',
layout='Contacts',
api_version='v1')
>>> fms.login()
>>> record = fms.get_record(1)
>>> record.name
John Doe
Supported Features
All API paths can be served:
- auth
- record
- find
- global
- script
Access to meta routes is also supported.
Sponsor
python-fmrest development is supported by allgood.systems. Monitor your web sites and get notifications when your scheduled FileMaker scripts or system scripts stop running.
Feel free to contribute!
If you would like to contribute, you can help with the code, try it out and report 🐞🐞, propose new features, write tests, add examples and documentation.
There's always room for improvement!
Questions/problems? Open a new issue. You can also contact me directly at dh@davidhamann.de.
Install
You need Python 3.6 or newer and FileMaker Server/Cloud 17 or newer.
You can install the library like this (preferably in a virtualenv):
pip install python-fmrest
Or the latest master:
pip install https://github.com/davidhamann/python-fmrest/archive/master.zip
Usage Examples
Examples can be found in the examples directory. Can't figure something out or feel an example is missing? Please file an issue.
Local development / running tests
Make sure to have requirements-dev.txt installed:
pip install -r requirements-dev.txt
Running pytest will run all tests. To run specific tests, specify the path:
pytest tests/unit
For running tests/integration you will need to have a real FileMaker Server and a test database.
For static type checking, please use mypy:
mypy fmrest
To have all tests plus static type checks run every time before a commit, please install the git hook:
cd hooks
chmod +x install.sh pre-commit.sh run-tests.sh
./install.sh
Bundling with PyInstaller
If you are building an application that should be bundled with PyInstaller, please add a hook file to your project to indicate to PyInstaller to copy python-fmrests metadata.
pyinstaller-hooks/hook-fmrest.py
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('python-fmrest')
Then add the path to the hooks directory to the Analysis section of your .spec file (in case you haven't done so for other hooks yet). For example: hookspath=['./pyinstaller-hooks'].
TO DO
Some bits and pieces are not implemented yet.
Examples of what I can think of:
- OAuth support
- Handling of reserved field names (currently,
record_id,modification_id,is_dirtyclash with used properties and you will not be able to read your own fields with the same name) - Needs more test coverage, e.g. for
get_records(),find(),edit_record() - Some more usage examples on how to create, edit, delete, set globals, etc. Tell me where you have issues by opening an issue.
- cli support would be great at some point in the future :-)
Metadata
Release files for python-fmrest 1.8.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 |
|---|---|---|---|---|
| python_fmrest-1.8.0.tar.gz | 22.9 kB | Without provenance | Details for python_fmrest-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_fmrest-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for python_fmrest-1.8.0-py3-none-any.whl |
Total release size: 47.6 kB
Release files / python_fmrest-1.8.0.tar.gz
| Download URL | python_fmrest-1.8.0.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c33e6e0a1927c17bec33f818db92de3f590ea947f8ac6ab90352edb10825ea8
|
|
BLAKE2b-256 checksum How to use checksums |
d156dbec82fed2256fe22ff5cf2663510117f30626deb37a72c9d47c53d94148
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / python_fmrest-1.8.0-py3-none-any.whl
| Download URL | python_fmrest-1.8.0-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89107a0eb37b7643796bbe9181a1e09782374594106ec28c291da552cd7d616c
|
|
BLAKE2b-256 checksum How to use checksums |
1e5bd6b40b1d7628eb7cef9fb530b55e2bb26ec294d4b9c110124be4ad9b7969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for python-fmrest 1.8.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.