Skip to main content

Toolkit for creating clients of HAL based Hypermedia APIs.

Project description

HALchemy for Python

HAL-based Hypermedia API clients for humans.

This project has lofty goals, and is in its very early stages. Please use with caution and beware of breaking changes until at least v0.7.0

Getting started

pip install halchemy

In your code, instantiate an Api object with the base URL of your API

from halchemy import Api

api = Api('http://example.org/api')

root = api.get()                           # get the root resource
people = api.get_from_rel(root, 'people')  # follow the people rel to get the list of people

(more docs coming)

Methods

  • get(self, url='/')
  • get_from_rel(self, resource, rel='self', parameters={}, template={})
  • get_from_rel_with_lookup(self, resource, rel, lookup, parameters={})
  • post_to_rel(self, resource, rel, data, parameters={}, template={})
  • patch_resource(self, resource, data)
  • put_to_rel(self, resource, data, rel='self')
  • delete_url(self, url)
  • delete_resource(self, resource)
  • url_from_rel(resource, rel, parameters={}, template={})
  • post_to_url(self, url, data)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

HALchemy-0.2.2-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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