Skip to main content

API client for the Ascentrade backend

Project description

About

Official API client library for Ascentrade. Automatically generated by Ariadne Codegen.

This library is available on PyPi. You can easily install it using pip install ascentrade_client

Virtual Environment

Create a virtual Python 3.10 environment and activate + install all dependencies.

python3.10 -m venv venv
source venv/bin/activate
pip3.10 install -r requirements.txt

Build Package

  • Start the backend API with introspection (debug) turned on
  • Run ariadne-codegen from inside this folder
  • The generated client library ascentrade_client will be copied to ./ascentrade_client

After the steps above you can then build the library by running python3 -m build

Optional: Install the generated package locally with python3 -m pip install ./dist/ascentrade_client-*.tar.gz

Example Use

The script tests/test.py shows an example usage of the generated client code.

import asyncio
from ascentrade_client import AscentradeClient

async def main():
	client = AscentradeClient("http://localhost:8042/graphql/")

	data = await client.currencies()
	for c in data.currencies:
		print(f'{c.id}: {c.name} ({c.iso_code})')

if __name__ == '__main__':
	asyncio.run(main())

Packaging

This package was created using the Python Packaging User Guide.

Custom Functions

If you need any special function calls for your application, just modify the queries.gql file and generate the library again.

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

ascentrade_client-0.1.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

ascentrade_client-0.1.0-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

Details for the file ascentrade_client-0.1.0.tar.gz.

File metadata

  • Download URL: ascentrade_client-0.1.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for ascentrade_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 278fd0e533f0b6d18657c3cbb245404e5912dc6d30aaba095e6948ded4f4678c
MD5 7bf40f1d19ceabbdc5c1d6415e21c57e
BLAKE2b-256 f1b5bde0e83d4a3e6e2dcc9b2a32366d7918cc22f4c41a7cae650337bd3c3f6c

See more details on using hashes here.

File details

Details for the file ascentrade_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ascentrade_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b29a79d719a9ac1855002baf0b638fc3108099e8102683be4a59710e2afb1d6
MD5 2100962db00717ed27cc36ae94c06759
BLAKE2b-256 d2b2240f57f778cadcfc27169f2d503fb5b20c3576067d0400628cd3517cea4e

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