Skip to main content

Easily import values into python

Project description

PyVals

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

Standard file extension: *.val

Possible Types(currently):

  • Integers
  • Float
  • Strings (with backslash chars)
  • Arrays
  • Math (Syntax: + - * / % ^)
  • Variable = Variable

Notes

Allowed variable characters are a-z, A-Z and _

Todo

  • Pycharm Extension
  • Implement other languages
  • Bridge the other languages(Although this is a Wish Dream)

Example

values.val:

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

main.py:

import pyvals

pyvals.register(globals())
pyvals.vals_from(open("values.val").read()) # you can use any string here

# Yes, these variables 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.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyVals-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d362fe0c7f42f2a1abc74607e01f4a50430b3d3341a37f2c7ad025d2d8a2c68c
MD5 d76bfd79ac870386d43c849e70683602
BLAKE2b-256 115e3fbe948c7fad3627605f1d05b69ebcdc719ee73db8a7e91acf4b8abdcc3d

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