Skip to main content

Wrapper for Multivalue Data

Project description

# universe_matrix

This package lets developers use BASIC style dynamic arrays within python. This is useful when you’re sending data back to universe and are trying to structure it to how it will be used natively.

Key points here are that indexing starts from 1 and -1 as a position means append, similar to how BASIC handles arrays.

# Requirements

This package requires the Rocket supplied module u2py as this is just a wrapper around it.

# Installation

pip install universe-matrix

# Examples

>>> from universe_matrix import UniverseMatrix
>>> a = UniverseMatrix()
>>> a[1] = 'Hello'
>>> a[2] = 'World'
>>> print(a.u2())
HelloþWorld
>>> a = UniverseMatrix()
>>> a[-1] = 'Hello'
>>> a[-1] = 'World'
>>> print(a.u2())
HelloþWorld
>>> a = UniverseMatrix()
>>> a[1] = 1
>>> a[2] = 2
>>> a[2,1] = 3
>>> a[2,2] = 4
>>> a[2,3] = 5
>>> a[2,3,1] = 6
>>> a[2,3,2] = 7
>>> a[2,3,2,2] = 8
>>> print(a.u2())
1þ3ý4ý6ü7û8
>>> print(a[2,3,1])
6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

universe_matrix-0.0.3-py2-none-any.whl (3.5 kB view details)

Uploaded Python 2

File details

Details for the file universe_matrix-0.0.3-py2-none-any.whl.

File metadata

  • Download URL: universe_matrix-0.0.3-py2-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.6.8

File hashes

Hashes for universe_matrix-0.0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 cf4559077847b840d2a29a9ab5506e207d8366f6dfac596253365bc3ee4930bc
MD5 9645d0faef444d76bdbd47ed9c28a74c
BLAKE2b-256 e4fce5f931d1952f2578d7fcbab977ffee12e6ce863ded53ad0ffea17c70b5b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page