Skip to main content

Axicor Python SDK

Official Python interface for the Axicor Spiking Neural Network (SNN) Engine.

CRITICAL: THE 10ms BUDGET & ZERO-GARBAGE LAW

Axicor operates on a hard real-time BSP (Barrier Synchronization) cycle. You have exactly 10ms to complete your observation-action loop.

You MUST NOT perform any heap allocations (creating new numpy arrays, tuples, or large objects) inside the hot loop. Triggering the Python Garbage Collector (GC) will cause a micro-stutter, resulting in dropped UDP packets and Biological Amnesia (loss of brain state).

Zero-Garbage Production Pattern

The Correct Way (Zero-Allocation)

import numpy as np
from axicor.encoders import PopulationEncoder

# 1. PRE-ALLOCATE everything outside the loop. Reused every tick.
encoder = PopulationEncoder(variables_count=4, neurons_per_var=16, batch_size=20)
# ✅ Pre-allocate buffer once
frame_buf = np.zeros(encoder.total_bytes + 20, dtype=np.uint8)

while True:
    obs = env.get_observation()
    # 2. ✅ encode_into() writes directly into the pre-allocated buffer
    # Offset=20 leaves space for the C-ABI ExternalIoHeader
    encoder.encode_into(obs, frame_buf, offset=20)
    
    # 3. Send via zero-copy UDP
    client.send(frame_buf)

The Wrong Way (Triggers GC)

while True:
    obs = env.get_observation()
    # ❌ WRONG: This creates a NEW array object every tick.
    # This triggers malloc() and will eventually force a GC pause.
    frame = encoder.encode(obs)
    client.send(frame)

Installation

pip install axicor-client

License

Dual-licensed under MIT or Apache 2.0.

Metadata

Release files for axicor-client 0.1.0

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

Source distribution (sdist)

Source distribution for axicor-client 0.1.0
File Size Uploaded Provenance
axicor_client-0.1.0.tar.gz 27.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for axicor-client 0.1.0
File Interpreter ABI Platform
axicor_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.7 kB

Release files / axicor_client-0.1.0.tar.gz

Download URL axicor_client-0.1.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3238d884276478c18b3d32fe21e07da7b3446b46b47b55482e73afd58cef15dc
BLAKE2b-256 checksum
How to use checksums
7a3de3927ea6837bf8397322b3c4f009713b490d377a7d0b911fc83bb0ba4125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / axicor_client-0.1.0-py3-none-any.whl

Download URL axicor_client-0.1.0-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa333b38418b03f6cf4fd61b56f4e19586f66c5a1bc0d64645da519d96644822
BLAKE2b-256 checksum
How to use checksums
19a5aaa8d20c0bb1e93f8a19c4e40e742b20bcc5cbdfd18651ec236665cb3fc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for axicor-client 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 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