Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.4.14 instead.
Reason given by maintainers: Replaced by 0.4.12

palisec

Python client for Palisec: your agent asks before every transaction and sends only on ALLOW. Async, typed, and no third-party dependencies. Python 3.10 or later.

pip install palisec

Alternative, straight from palisec.tech: pip install https://palisec.tech/sdk/palisec-0.4.1-py3-none-any.whl.

import os
from palisec import Palisec, PalisecDeniedError

async with Palisec(os.environ["PALISEC_API_KEY"]) as palisec:  # server-side only
    try:
        result = await palisec.send_transaction(sender, to=TOKEN, data=calldata, gas_limit=90_000)
        if result.hash is None:
            print("held for a human approver:", result.operation.operation_id)
    except PalisecDeniedError as e:
        print(e.code, e.message)  # nothing was sent

sender is the agent's own account. With web3.py:

from web3 import AsyncWeb3, AsyncHTTPProvider
from eth_account import Account
from palisec.web3 import Web3Sender

w3 = AsyncWeb3(AsyncHTTPProvider("https://rpc.testnet.chain.robinhood.com"))
sender = Web3Sender(w3, Account.from_key(os.environ["AGENT_KEY"]))
  • authorize(...) records a decision: ALLOW, DENY or REQUIRES_HUMAN_SIGNATURE. It does not raise on DENY. Safe to retry: the request ID is the idempotency key.
  • evaluate(...) is a dry run that reserves nothing.
  • wait_for_approval(id), get_operation(id), cancel(id) (withdraws a pending approval; never retried).
  • Errors are PalisecError subclasses with a stable code (PS_…). Retries happen only for network errors, 429 and 5xx, and only on calls that are safe to repeat.
  • Log events never contain your API key, request bodies or calldata; redact() masks keys in any string.

Palisec runs on Robinhood Chain mainnet (4663) and testnet (46630); a ps_live_ key is mainnet, a ps_test_ key testnet. Agents with a PALISEC smart account are enforced on chain (execute_with_smart_account); an agent that sends from a plain key is enforced only in its own process. Docs: https://palisec.tech/docs/sdk/python

Metadata

Release files for palisec 0.4.10

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

Source distribution (sdist)

Source distribution for palisec 0.4.10
File Size Uploaded Provenance Actions
palisec-0.4.10.tar.gz 18.9 kB Without provenance Details for palisec-0.4.10.tar.gz

Built distribution (wheel)

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

Total release size: 37.2 kB

Release files / palisec-0.4.10.tar.gz

Download URL palisec-0.4.10.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
42f34254bd7f78ed4cdb3ff8975d55d00bac0fafb58303fbffe1cb68f8ac0d2d
BLAKE2b-256 checksum
How to use checksums
306b8c0f4fbede1a72c8939e77ecffd036047dd54a871e0974f4e63617ecd606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / palisec-0.4.10-py3-none-any.whl

Download URL palisec-0.4.10-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1abfa685d4d1bde6c446a2bdc234560cc76cbdcd22a199be839993383eddef3c
BLAKE2b-256 checksum
How to use checksums
26b2b3a08bc71fe331a8b754f670675267d5917a88c959c3638dd5bac4589761
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for palisec 0.4.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.10 This release

2 release files No provenance

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