Skip to main content

pymatgraph

pymatgraph is a Python package that provides a multiprocess-safe buffer for PyTorch tensors, specifically designed for rendering RGB matrices and tables using Pygame. This package allows for efficient sharing of tensor data between processes, making it suitable for applications that require real-time rendering and updates.

Features

  • Multiprocess Safe: Utilizes shared memory and locks to ensure safe access to tensor data across multiple processes.
  • Flexible Modes: Supports both numerical and RGB modes for tensor data.
  • Table Rendering: Built-in utilities to render structured tabular data directly on the screen.
  • Easy Integration: Designed to work seamlessly with Pygame for rendering visual data.

Installation

You can install the pymatgraph package using pip:

pip install pymatgraph

Usage

Here is a simple example of how to use the pymatgraph package:

width, height = 640, 480
buffer = MultiprocessSafeTensorBuffer(n=height, m=width, mode="rgb")
buffer.write_matrix(torch.zeros((height,width,3), dtype=torch.uint8))

g = Graphics(width=width, height=height, bg_color=(30,30,30))

text1 = Text("Custom Rendering Engine!", x=50, y=50, font_size=32, color=(255,255,0))
table1 = Table(
    data=[["Name","Age"], ["Alice","24"], ["Bob","30"]],
    x=50, y=120, cell_width=120, cell_height=40,
    bg_color=(50,50,100), grid_color=(255,255,255)
)

text1.render_to_tensor(buffer)
table1.render_to_tensor(buffer)

g.run(buffer)

Metadata

Release files for pymatgraph 0.3.3

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

Source distribution (sdist)

Source distribution for pymatgraph 0.3.3
File Size Uploaded Provenance
pymatgraph-0.3.3.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 25.5 kB

Release files / pymatgraph-0.3.3.tar.gz

Download URL pymatgraph-0.3.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
92c97eed060ac213b22245e0b708dafba589c1a7bd6d3e23c7884ead98a7918c
BLAKE2b-256 checksum
How to use checksums
2d206c2d31c15f7a5ac1081ed64ace2a29b2471ae6dd17a63a6b89afa3c0e1f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / pymatgraph-0.3.3-py3-none-any.whl

Download URL pymatgraph-0.3.3-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e601b0900c9caf1c84ff9ec37b60f46ee81408154f8f347d928ed3503870790f
BLAKE2b-256 checksum
How to use checksums
7ab9b334a3a6f1455102eed46714ab414bc9858f3bdbe1651e079de52827accb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for pymatgraph 0.3.3

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.

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