Skip to main content
Canister Logo

Canister.py

License Stars LoC

The official library for interacting with Canister in Python.
Made with love by Jaidan.

💻 Documentation

See here for all Canister.py documentation.

❓ Contributing

See here for instructions on how to contribute.

⚡️ Example Usage

Below is a good example of how to use Canister.py.

# import asyncio
import asyncio
# import types
from typing import List
# import canister
from canisterpy import (
    Canister, Package, PackageSearchFields
)

# set up client
client = Canister(user_agent='Canister.py Example')

# main function
async def main(package: str) -> List[Package]:
    # create search fields
    fields = PackageSearchFields()
    # pick out fields
    # we want to search by name and author, so
    fields.set('name', True).set('author', True)
    # search for query
    packages = client.search_package(package, fields)
    # return what we found
    return packages

print(asyncio.run(main('test')))
if not client.is_closed(): client.close()

Download files

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

Source Distribution

cnstr-1.0.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

cnstr-1.0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file cnstr-1.0.2.tar.gz.

File metadata

  • Download URL: cnstr-1.0.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cnstr-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9bcfaee42b7e296a2c6325ca82779dc806b9b550e709562b3c1a443da7a8bd1c
MD5 7c0320dbb3c220effc3725b73ea3eea4
BLAKE2b-256 fe7427611ab9e29e14fcdbf743d4b2996fd179aa4d81fa28c3ef65549628393a

See more details on using hashes here.

File details

Details for the file cnstr-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: cnstr-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cnstr-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ad76479e94367e0743e705e8f28d6d0b33c0e11c4b5db7273ec3f424f5f3f72
MD5 43224ee81753a5386e2dcce796ce1940
BLAKE2b-256 0b49d91bc713f35b56292dc204070dc35ab7085f8abfd111028d0b12f0f3efab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page