Skip to main content

HAL for humans

Project description

halchemy for Python

HAL for humans

Do you have an API that serves data following the HAL specification? The halchemy library makes it easy for your client to make the most of that API.

Getting Started

Install halchemy using the package manager of your chosen language:

pip install halchemy

In your code, create an Api object with the URL of your API.

from halchemy import Api

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

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

# Issue a refund of $5 to everyone
for person in people['_items']:
    account = api.follow(person).to('account').get()
    api.follow(account).to('deposit').post({'amount':5.00})
    print(f"{person['name']} has a new balance of ${account['balance']}")

Read the docs to learn more!

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

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

halchemy-1.0.9-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file halchemy-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: halchemy-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for halchemy-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d49e4ebec9a174b322798c4221de90f3999ac1f962198ee3e3a4971b6c609ec5
MD5 de16dbb4c7192074b03017f53694a9e8
BLAKE2b-256 5d7dc144177e82c833cd6bcd96144bbe2651b9f5a7cacb0d86aaebc9d1c92b1e

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