Skip to main content

Calculate expressions in a string using eval without security threats!

Project description

EvalSafe

EvalSafe is my small library for python. It's library help you with Calculate expressions in a string using eval without security threats.

(I do not know who needs it, I did it out of boredom)

Example of using

If digital data is entered

import evalsafe

print(evalsafe.evals("5 + 5 + 5"))

Result: 15

If a command from python is entered

import evalsafe

print(evalsafe.evals("print('text')"))

Result: Error, incorrect value entered!

Project details


Release history Release notifications | RSS feed

This version

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EvalSafe-1.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

EvalSafe-1-py3-none-any.whl (1.8 kB view hashes)

Uploaded Python 3

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