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, ...
>>> fms = fmrest.Server('https://your-server.com', user='admin', password='admin', database='Contacts', layout='Contacts') >>> fms.login() >>> record = fms.get_record(1) >>> record.name John Doe
All API paths can be served:
Feel free to contribute!
If you would like to contribute, you can help with the code, try it out and report
There's always room for improvement!
You need Python 3.6 and FileMaker Server/Cloud 17.
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
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
pytest will run all tests. To run specific tests, specify the path:
tests/integration you will need to have a real FileMaker Server and a test database.
For static type checking, please use
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
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:
Some bits and pieces are not implemented yet.
Examples of what I can think of:
- OAuth support
- Handling of reserved field names (currently,
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
- 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 :-)