Install & Compatibility
Where this runs
tested against v0.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✕ build_error
58MB installed
● package 58MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
algosdk
✓ import algosdk
While `compalgo` specific imports are not publicly documented, it is expected to build upon the core `algosdk` library for Algorand interaction. Direct imports for `compalgo` classes/functions would depend on its internal structure.
algod.AlgodClient
✓ from algosdk.v2client import algod
Common import for connecting to an Algorand node to interact with the blockchain.
This quickstart demonstrates fundamental interactions with the Algorand blockchain using the `py-algorand-sdk`, which `compalgo` is expected to leverage. It shows how to connect to an Algorand node and retrieve transaction parameters. Specific usage of the `compalgo` library itself for compliance analysis and proof anchoring is not detailed due to the lack of dedicated public documentation. Users would typically extend this foundational setup with `compalgo`'s own methods and classes once its API is known.
import algosdk
from algosdk.v2client import algod
from algosdk import mnemonic
import os
# NOTE: Specific 'compalgo' usage is not publicly documented.
# This quickstart demonstrates basic Algorand SDK interaction that 'compalgo' would likely build upon.
# --- Configuration (replace with your actual TestNet/MainNet details) ---
algod_address = os.environ.get('ALGOD_ADDRESS', 'http://localhost:4001') # e.g., 'https://testnet-api.algonode.cloud'
algod_token = os.environ.get('ALGOD_TOKEN', 'a' * 64) # Replace with your Algod API token
# Initialize AlgodClient
algod_client = algod.AlgodClient(algod_token, algod_address)
print(f"Connected to Algorand node at: {algod_address}")
# Example: Get suggested transaction parameters
transaction_params = algod_client.suggested_params()
print("Suggested transaction parameters:", transaction_params)
# Example: Generate a new Algorand account (for testing/demonstration)
private_key, address = algosdk.account.generate_account()
print(f"\nGenerated Account Address: {address}")
print(f"Generated Account Private Key (Mnemonic): {mnemonic.from_private_key(private_key)}")
# NOTE: For actual 'compalgo' functionalities, refer to its (currently unavailable) specific documentation.
Debug
Known issues
gotchaDedicated documentation and a public GitHub repository specifically for 'compalgo' (version 0.1.2, for Algorand smart contract compliance) are not readily available via public search. This makes understanding its specific API, usage patterns, and advanced features challenging.fixRely on the PyPI summary and the general Algorand Python ecosystem documentation (like `py-algorand-sdk` and `pyteal`) to infer potential functionality. Monitor PyPI for updates or official announcements regarding dedicated documentation or a GitHub repository for 'compalgo'.
affects: 0.1.2
breakingAlgorand Smart Contracts (ASC1s), whether written directly in TEAL or via Python/PyTeal, have strict resource constraints (e.g., opcode budget, state size). Complex compliance logic or large proof anchoring data could hit these limits.fixDesign smart contracts with efficiency in mind. Minimize transaction size and computational steps. Utilize off-chain computation where possible and only anchor necessary proofs on-chain. Refer to Algorand's TEAL and PyTeal optimization guides.
affects: All versions interacting with Algorand Smart Contracts
gotchaWhen interacting with the Algorand blockchain, accounts require a minimum balance of ALGO to be active and to cover transaction fees. Account operations that drop the balance below the minimum will be rejected.fixAlways ensure Algorand accounts used by `compalgo` or your application have sufficient ALGO to cover minimum balance requirements (currently 0.1 ALGO + 0.1 ALGO per asset/app opted-in) and transaction fees (typically 0.001 ALGO per transaction). Use TestNet faucets for development.
affects: All versions interacting with the Algorand blockchain
gotchaAlgorand's transaction finality is very fast (typically 4-5 seconds), but applications should handle potential network latency or temporary outages when submitting critical transactions.fixImplement robust error handling and retry mechanisms for transaction submission. Monitor transaction status and confirm inclusion on the blockchain using the Algorand SDK or an indexer.
affects: All versions interacting with the Algorand network
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'compalgo'
The `compalgo` library is not installed in the current Python environment.
fixRun `pip install compalgo` to install the library.
ImportError: cannot import name 'AlgorandComplianceSDK' from 'compalgo'
The specific class, function, or submodule named 'AlgorandComplianceSDK' does not exist or is not exposed under this name directly from the 'compalgo' package, likely due to a lack of clear API documentation.
fixConsult any available `compalgo` source code, examples, or documentation (if released) to identify the correct import paths and names for its components.
AttributeError: 'NoneType' object has no attribute 'analyze_contract'
A method (`analyze_contract`) is being called on an object that is `None`, indicating that the object was not successfully instantiated or returned as expected, possibly due to incorrect initialization or missing dependencies/configurations.
fixEnsure that any objects returned by `compalgo` functions are properly initialized and not `None` before attempting to call methods on them. Verify all prerequisites, such as connection parameters or client configurations, are correctly set up.
Upgrade
Version history
0.1.2latest on PyPI · released Dec 1, 2025
Audit
Dependencies
py-algorand-sdkrequiredLikely core dependency for interacting with the Algorand blockchain, given 'Algorand smart contract' in the description.
pytealoptionalPotentially used for Python-based smart contract development or analysis, as hinted by 'smart contract compliance analysis'.