Skip to main content
https://travis-ci.org/mariaebene/py-restfmclient.svg?branch=master https://codecov.io/gh/mariaebene/py-restfmclient/branch/master/graph/badge.svg

In short This library gives you full access to Filemaker with a pythonic api.

RESTfm gives you full Create, Read, Update and Delete ( CRUD ) operations on FileMaker Server hosted data via standard HTTP GET, POST, PUT and DELETE methods, this means you can get can get access to Filemaker over HTTP and with this library of also with Python 3.5+.

Requirements

  • Python 3.5+

  • Tested with FileMaker 15 Server, should work with others.

Available over pip

We upload releases to pypi, you can get restfmclient over pip:

pip3 install restfmclient

Install RESTfm on *nix

  • Install Apache with mod_php or better nginx with php-fpm, there are a lot tutorials for that.

  • Download RESTfm from https://github.com/GoyaPtyLtd/RESTfm/releases and extract it to /var/www:

    wget https://github.com/GoyaPtyLtd/RESTfm/releases/download/v4.0.8/RESTfm-4.0.8.tgz
    sudo tar xfz RESTfm-4.0.8.tgz -C /var/www
  • Copy FileMaker ServerWeb PublishingFM_API_for_PHP_Standalone.zip on your server (use winscp or scp).

  • Extract FM_API_for_PHP_Standalone.zip on the linux box:

    cd /var/www/RESTfm/FileMaker/
    unzip ~/FM_API_for_PHP_Standalone.zip
  • Configure RESTfm:

    nano RESTfm.ini.php
  • Adjust at least: $config[‘database’][‘hostspec’]

Install RESTfm on Windows

  • Same as with Linux but with XAMPP, get the PHP 5.6 version.

Run the example

  • Git clone:

    git clone https://github.com/mariaebene/py-restfmclient.git
  • Install the FileMaker example DB on your host, copy examples/restfm_example.fmp12 on it and activate the db.

  • virtualenv:

    cd py-restfmclient
    virtualenv -p /usr/bin/python3.5 --no-site-packages venv
  • pip install:

    ./venv/bin/pip3 install -r requirements_dev.txt
  • install restfmclient:

    ./venv/bin/python3 setup.py develop
  • Run it:

    ./venv/bin/python3 examples/restfm_client.py "http://<ip-or-dnsname-of-restfm-box>/RESTfm/" admin supersecretpw
  • Or run with the RESTfm demo server:

    ./venv/bin/python3 examples/restfm_client.py "http://demo.restfm.com/RESTfm/" write restfm

Install in your own project

Its recommended to use a virtualenv for your project.

Install via pip:

pip3 install restfmclient

aiohttp works a lot better with cchardet, aiodns and uvloop so install those:

pip3 install cchardet aiodns uvloop

Activate uvloop in your own scripts:

import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

Testing

Just install requirements_dev.txt and run nosetests for a simple mocked test:

git clone https://github.com/mariaebene/py-restfmclient.git
cd py-restfmclient
virtualenv -p /usr/bin/python3.5 --no-site-packages venv
source venv/bin/activate
pip3 install -r requirements_dev.txt
nosetests

If you want to run the tests against a live server you have to install examples/restfm_example.fmp12 on the Filemaker server, then you can run it by giving the ENV variable RESTFM_BASE_URL:

RESTFM_BASE_URL='http://admin:supersecretpw@<<ip-or-dnsname-of-restfm-box>/RESTfm/' nosetests

Development

Please provide pull requests if you want to improve py-restfmclient, just make sure that you don’t break the API if not required. Please run nosetests before you create a PR if you can.

To update the test mock files, run:

rm -rf restfmclient/tests/data/*
RESTFM_BASE_URL='http://admin:supersecretpw@<<ip-or-dnsname-of-restfm-box>/RESTfm/' RESTFM_STORE_PATH='restfmclient/tests/data/' nosetests

We use zest.releaser to create a release and upload it to pypi.

LICENSE

Copyright 2017 - Stiftung Maria Ebene, licensed under the MIT license.

Changelog

1.2.1 (2016-12-17)

  • Fix timezone conversations.

1.2.0 (2016-12-17)

  • Improve tests, add more Date types.

  • Better default block_size and convert input search values.

  • Use tzlocal.get_localzone() as default timezone.

1.1.0 (2016-12-15)

  • Fix a bug with tests, export Record, add name property to layout.

  • Use type converters as staticmethods, this breaks the API.

  • Fix 2 smaller bugs.

  • Do not chache “count” in layouts, we want always the current number.

1.0.0 (2016-12-10)

Metadata

Release files for restfmclient 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for restfmclient 1.2.1
File Size Uploaded
restfmclient-1.2.1.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for restfmclient 1.2.1
File Interpreter ABI Platform
restfmclient-1.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 27.5 kB

Release files / restfmclient-1.2.1.tar.gz

Download URL restfmclient-1.2.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
12b27f83f0d6b73f27895eb167f4f5bca2d21fe9a6786b669f6d50ab11b25a26
BLAKE2b-256 checksum
How to use checksums
270e5aca29fc60222729c2cd6551ca0f2cc0e9f305a03889975f54f91cc22455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / restfmclient-1.2.1-py2.py3-none-any.whl

Download URL restfmclient-1.2.1-py2.py3-none-any.whl
Size 16.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
60abd6bae3aec169953902690798a3e3a5bc6382f7f1f1d466a435a901e00bd6
BLAKE2b-256 checksum
How to use checksums
15e0fff8009a8f2772e46828de7634213467b7a3f7f0c2599f8fa1408ab8d097
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page