Skip to main content

python-fmrest is a wrapper around the FileMaker Data API.

Project description

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')
>>> fms.login()
>>> record = fms.get_record(1)
>>> record.name
John Doe

Supported Features

All API paths can be served:

  • auth
  • record
  • find
  • global
  • script

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 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

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_dirty clash 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 :-)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-fmrest-1.4.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_fmrest-1.4.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file python-fmrest-1.4.0.tar.gz.

File metadata

  • Download URL: python-fmrest-1.4.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.7.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for python-fmrest-1.4.0.tar.gz
Algorithm Hash digest
SHA256 68eb8724ba3621c9354a6f7b912fcb8d0b6571d660f75534f18cec52e198f03d
MD5 08c7a1878d5b279a992eebb2bb92c1ba
BLAKE2b-256 36d0b832d22183f0349964ba42dcf710e5c296dc53ea448242313e00a6caa8b6

See more details on using hashes here.

File details

Details for the file python_fmrest-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: python_fmrest-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.7.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for python_fmrest-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25dc7f658af70215e4f15fa9857ab7d541800e6a9adcff7cd39ebd65f5012500
MD5 92be84046a8bd0cb07478e402fa433b9
BLAKE2b-256 20637dd2abed6aa7daae5195b137952f841a59b0f29326d91af8b16f77356463

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page