Skip to main content

ENGINE4 API Wrapper

Project description

engine4-python

⚙️ Python library for the ENGINE4 API.

Installation

Use pip to install the package:

pip3 install engine4

Usage

First of all, you import ENGINE4 so that you can create an instance of the class. You need to pass the base_url of the API server:

from engine4 import ENGINE4

engine4 = ENGINE4('https://test.engine4.io/')

Now you can authenticate yourself with username, password and client_id:

def authenticate() -> str:
  username = 'my_username'
  password = 'my_password'
  client_id = 'my_client_id'
  result = engine4.authenticate(username, password, client_id)
  return result.access_token

The access token is required for the following calls.

Here you can find examples:

from engine4 import FetchFilterOptions

access_token = authenticate()

def fetch() -> list:
  entity_id = '12e2eb88-814a-0a98-40e2-b006586dfd59'
  skip = 0
  take = 2
  with_long_values = False
  is_active = True
  filter = FetchFilterOptions('CreatedDate', '>', '2018-01-01T00:00:00.000Z')
  result = engine4.fetch(access_token, entity_id, skip, take, False, is_active, filter)
  return fetch_result['items']

Changelog

See CHANGELOG.md.

License

See LICENSE.

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

engine4-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

engine4-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file engine4-0.0.2.tar.gz.

File metadata

  • Download URL: engine4-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for engine4-0.0.2.tar.gz
Algorithm Hash digest
SHA256 12a066b5cfaf461d783a16e9e47267d6e19f115779af33935a53e682172025a3
MD5 537810c6ffb6da2e468a3896f3d85b6e
BLAKE2b-256 2d6b712b684d1c16b85f6b29a6d2a065bcdc4eb1c6cdd4b022bbbc560d899070

See more details on using hashes here.

File details

Details for the file engine4-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: engine4-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for engine4-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 28b48080ca80fe2dc65ee677542d41fe02006299f6fa058fc8d707f93529fa75
MD5 92b1883b3b073f17eb73732599469c1e
BLAKE2b-256 ce5dc519a7999638082d5d822c8196032ccf9ff8b2162611642494afa92ceaa2

See more details on using hashes here.

Supported by

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