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.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyVals-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd3dc089d72e733e6665e56e1ba6804e4725ed8e4a6f2ac96ef9c873d450a72
MD5 83b17d58ef13a29649d8791e48974298
BLAKE2b-256 3b06362b685a2de28280c56adb0438a108073609dc68fef499cee1c08193956b

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