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()

Metadata

Release files for cnstr 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cnstr 1.0.2
File Size Uploaded
cnstr-1.0.2.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cnstr 1.0.2
File Interpreter ABI Platform
cnstr-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / cnstr-1.0.2.tar.gz

Download URL cnstr-1.0.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9bcfaee42b7e296a2c6325ca82779dc806b9b550e709562b3c1a443da7a8bd1c
BLAKE2b-256 checksum
How to use checksums
fe7427611ab9e29e14fcdbf743d4b2996fd179aa4d81fa28c3ef65549628393a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / cnstr-1.0.2-py3-none-any.whl

Download URL cnstr-1.0.2-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ad76479e94367e0743e705e8f28d6d0b33c0e11c4b5db7273ec3f424f5f3f72
BLAKE2b-256 checksum
How to use checksums
0b49d91bc713f35b56292dc204070dc35ab7085f8abfd111028d0b12f0f3efab
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page