EVE
EVE is an lightweight data-interchange format.
Getting Started
These instructions will help you get started using EVE
Installing
You can install it with pip (https://pypi.org/project/evepy/)
pip install evepy
Another way is to clone the repo and import the python file (Eve.py)
If none of them, you can also put the GitHub URL in your requirements.txt file (https://pip.pypa.io/en/stable/user_guide/#requirements-files)
Upgrading Version
You can upgrade Eve with the following pip command:
pip install evepy -U
Example use
Here are examples of how to use EVE
Example.eve
[
@ Simple Stuff
'String' :: 'Hello, World!' @ A simple string : Hello, World
'Int' :: 5 @ A simple int : 5
'Float' :: 6.9 @ A simple float : 6.9
'Bool' :: False @ A simple bool : False
'List' :: ('a', 1, False) @ A simple list : ['a', 1, False]
@ Advanced Stuff
{String.Upper}
'Advanced_String' :: 'Hello, World!' @ An advanced string : HELLO, WORLD!
{Math.Eval}
'Advanced_Math' :: (5 + 2) * 3 @ Doing math : 21
{Math.Round}
'Advanced_Float' :: 6.9 @ Float rounding : 7
{Hash.MD5}
'Advanced_Hashing' :: 'Hello, World!' @ Hashing strings : 65a8e27d8879283831b664bd8b7f0ad4
{List.Lower}
'Advanced_List' :: ('A', 'B', 'C') @ Changing list values : ['a', 'b', 'c']
'Math_List' :: (10 + 10, (5 + 2) * 3) @ Doing math in list : [20, 21]
@ And much more!
];
[
@ Btw, you can have multiple sections.
'IsGonnaUseEVE?' :: True
];
Example.py
import Eve
# Load a file :: load(path)
Data = Eve.Load ('Example.eve')
# Print variables (Prints: Hello, World!)
print (Result[0]['String'])
Parsing:
import Eve
Data = Eve.Parse (Eve.Load ('Test.eve'))
print (dir (Data))
"""
If the file only has 1 section, you can access variables like this:
print (Data.MyVar1)
print (Data.MyVar2)
print (Data.MyVar3)
"""
"""
If the file contaions more than one section, you'll need to access them like this:
print (Data.Section0.MyVar1)
print (Data.Section0.MyVar2)
print (Data.Section0.MyVar3)
print (Data.Section1.MyVar4)
"""
ATOM grammar syntax highlighting
You can find the syntax file which is named: EVE.cson
Methods
Load Method
The load method takes in a path to an eve file, and returns the content
Load (Path)
Loads Method
The loads method takes in EVE data and returns a dict of the content
Loads (Data)
Features
Variable Marking
The variable defining feature let's you control different variables
Supported definers:
- String
- Upper : Makes the string uppercase
- Lower : Makes the string lowercase
- Math
- Eval : Calculates the variable value
- Round : Rounds up a float to nearest 1
- Hash
- MD5 : Hashes the variable value with MD5
- List
- Upper : Makes all string values in the list uppercase
- Lower : Makes all string values in the list lowercase
Examples:
[
@ This here will always make the string uppercase (Return: 'MARTIN')
{String.Upper}
'Name' :: 'martin'
@ This here will add the numbers (Return: 7)
{Math.Eval}
'Number' :: 5 + 2
@ This will round up the float (Return: 7)
{Math.Round}
'Float' :: 6.7
];
Contribute
Feel free to make a pull request, so you can help create Eve! And also feel free to create Eve in other languages!
Authors
- Dmunch04 - Initial Work - [EVE] (https://github.com/Dmunch04)
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for evepy 3.1
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 |
|---|---|---|---|---|
| evepy-3.1.tar.gz | 5.3 kB | Without provenance | Details for evepy-3.1.tar.gz |
Release files / evepy-3.1.tar.gz
| Download URL | evepy-3.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d72f347a22d8c070576f537d3cf1c44d52c77e3be4d3e4312cfe3df768ce0e4b
|
|
BLAKE2b-256 checksum How to use checksums |
060403a92321ba960b375a529698ac416fb68dad049baff271f18e261904884e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
|
Security for evepy 3.1
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.