Skip to main content

Easily import values into python

Project description

PyVals

WARNING: THIS IS EXTREMLY HACKABLE, DO NOT USE IT FOR CLIENT INTERACTIONS!

File extension: *.val

Example

values.val:

a=2
b="Hello World"
c=a
d=%math(2+2*2^2)

main.py:

import pyvals

pyvals.vals_from(open("values.val").read())
# You need to re-import all the values after executing vals_from
from pyvals import *

# Yes, this variable did automatically generate
print(a)
print(b)
print(c)
print(d)
# output:
# 2
# Hello World
# 2
# 10

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

PyVals-1.0.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file PyVals-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: PyVals-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for PyVals-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14b2c117ece1ffcf617ed3cc4b92250f55fe7f5c53a2d82de11a97e43e307eac
MD5 306eff973a4fc2d330d0b24f7a4de93d
BLAKE2b-256 44231d277b4cde5baf86b56464da4735b03dc6d0e8e583b6595d21fcdb519c8f

See more details on using hashes here.

Supported by

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