Skip to main content

Jsmaps:

Starting with Js maps

  • Creating a map:
jsmap = map_({'hi':'hello', 'wave':'hi'})
  • Basic showcase:
from jsmaps import m #placeholder for map_
jsmap = m({'hi':'hello', 'wave':'hi', 0:'zero'})
print(jsmap)
#{
#    [0] [hi: hello]
#    [1] [wave: hi]
#    [2] [0: zero]
#}
print(jsmap[1])
#hi
print(jsmap['hi'])
#hello
print(jsmap.get(0))
#zero
print(jsmap.pair(0))
#{'hi':'hello'}
print(jsmap.getpair(0))
#{2: 'zero'}   2 is the index in the map and zero is the value
jsmap[0] = 'bye'
#hi will now be bye
jsmap['wave'] = 'hand'
#wave will now be hand

Jsmaps Docs:

.get(self, value):

Like jsmap[value] expect the value is always treated as a dict key.

.pair(self, value, *, type=dict):

Returns the not specifed pair as a dict or list.

For example:

#map has [1] [hi: hello]
.pair(1) #{'hi':'hello'}
.pair('hi') #{1:'hello'}
.pair(1, type=list) ##['hi','hello']

.getpair(self, value, *, type=dict):

returns the index and value of a key as a dict or list.

#map has [2] [0: zero]
.getpair(0) #{2: 'zero'}

Tuple sets(beta)

Warning! beta. not completed.

Goal:

jsmap[key, slot] = value
jsmap[1, 1] = 'hi' #[1] ['hello':'hi'] is now [1] ['hi':'hi']
jsmap[1, 2] = 'hi' #[1] ['hi':'hello'] is now [1] ['hi':'hi']
jsmap[1, None] = {'hi': 'hi'} #[1] ['hello':'hello'] is now [1] ['hi':'hi']

Metadata

Release files for jsmaps 0.1.2

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

Source distribution (sdist)

Source distribution for jsmaps 0.1.2
File Size Uploaded Provenance Actions
jsmaps-0.1.2.tar.gz 2.7 kB Without provenance Details for jsmaps-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 5.5 kB

Release files / jsmaps-0.1.2.tar.gz

Download URL jsmaps-0.1.2.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
355986dfbb3107af21dddaea8a30f91600cd87cd413c8b399178c9fb65bb6366
BLAKE2b-256 checksum
How to use checksums
01efa8243284d86777baf2f5e58697f66a0fbab05f545e37d09fdf3a1153a3cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Linux/5.13.0-1027-gcp

Release files / jsmaps-0.1.2-py3-none-any.whl

Download URL jsmaps-0.1.2-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dcff698cd2f735f1e32c8ca147b937e08639bb2ccb600925335d8bf860a45ad
BLAKE2b-256 checksum
How to use checksums
263964537abe4ab5efeff29d308fe9873701c69b2817b751ff9de447ac6e189b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Linux/5.13.0-1027-gcp

Security for jsmaps 0.1.2

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.

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