Changelog
For the changelog, see www.salabim.org/vardict/changelog .
Introduction
With vardict, it is possible to build up a dictionary based on variable names and their value. For instance,
first_name = "John"
last_name = "Smith"
name = vardict(first_name, last_name)
Now, name will be dict(first_name='John', last_name='Smith').
In the same call, additional keywords can be added:
name = vardict(first_name, last_name, age=21, nationality="FR")
Now, name will be dict(first_name='John', last_name='Smith', age=21, nationality='FR').
This functionality is handy for calling functions with (many) keyword arguments, e.g. with salabim:
for x in range(1001,100):
for y in range(701, 100):
text = f'{x}-{y}'
sim.Animatext(**vardict(x, y, text, angle=45)) # instead of sim.Animatext(**vardict(x=x, y=y, text=text, angle=45))
Note that only variables are allowed, so no literals or expressions.
Usage
Importing can be done with
import vardict
or
from vardict import vardict
Installation
Just install with pip install vardict.
Metadata
Release files for vardict 1.0.5.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vardict-1.0.5.post0.tar.gz | 3.8 kB | Without provenance | Details for vardict-1.0.5.post0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vardict-1.0.5.post0-py3-none-any.whl | Python 3 | none | any | Details for vardict-1.0.5.post0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / vardict-1.0.5.post0.tar.gz
| Download URL | vardict-1.0.5.post0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6a32ed5cf89938726cf2d3e6412eea2de09bf97be51a435d436f691f474547d
|
|
BLAKE2b-256 checksum How to use checksums |
1fa05c63c4dddad58bba8f18d0386b1174c39ff0b7bc73ba53026c6ff6382c4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / vardict-1.0.5.post0-py3-none-any.whl
| Download URL | vardict-1.0.5.post0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57c1156aa794aa0315a82931d3a6c1c53eda4d70b5515a23b3dd19e2c5122402
|
|
BLAKE2b-256 checksum How to use checksums |
c4a79f7948eae1c75aaada0ee1f0daec73b2da847a9731ec8101a71c7cc92af2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for vardict 1.0.5.post0
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.