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.1.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.1-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ascentrade_client-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 394e8efab313000893ce40d50910667a1d76cf9b71717631e45b6bb28d007fdc
MD5 baf0a90aa64ce2407fe879816bb8f570
BLAKE2b-256 e95c7943855016e4e0478865f38aa8c1cf6197826b0c2cb035fb26f79ee3b30b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ascentrade_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5785679f169abe9604a8e76d292f5cbc95eb9ab34aa5c3e3228d5c5501c2735
MD5 4d9d31ab165cf8010af6f8e8b95651f8
BLAKE2b-256 fd62ee125ff55406b7a3a8693cfa38f39497cd2f560442578a813d4592ae667a

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