A modern programming language for web development and rapid prototyping
Project description
Veyra Programming Language
Veyra is a modern programming language designed for web development and rapid prototyping, featuring built-in web capabilities and a clean, readable syntax.
โจ Features
- ๐ Fast Development: Simple syntax with powerful built-ins
- ๐ Web-Native: Built-in HTML, CSS, and web server functionality
- ๐ฆ Package Management: Easy dependency management with
veyra-pm - ๐ฏ AI-Ready: Integrated machine learning functions
- ๐ง Extensible: Easy to add new features and libraries
- ๐ Rich Standard Library: Math, string manipulation, and utility functions
๐ฆ Installation
From PyPI (Recommended)
pip install veyra
From Source
git clone https://github.com/nishal21/veyra.git
cd veyra
pip install -e .
Requirements
- Python 3.8+
๐ Quick Start
Create a file hello.veyra:
fn main() {
println("Hello, Veyra!");
}
Run it:
veyra hello.veyra
๐ Web Development Example
fn main() {
let page = create_page(
"My App",
html_element("h1", "Welcome to Veyra!"),
css_style("body", "background: #f0f0f0;")
);
web_serve(page, 8080);
}
Visit http://localhost:8080 in your browser!
๐ Language Features
Variables and Functions
let message = "Hello";
let count = 42;
fn greet(name) {
return "Hello, " + name + "!";
}
Control Flow
if count > 10 {
println("Count is high");
} else {
println("Count is low");
}
while count > 0 {
println(count);
count = count - 1;
}
Arrays and Objects
let numbers = [1, 2, 3, 4, 5];
let person = {"name": "Alice", "age": 30};
๐ Standard Library
Math Functions
abs(x)- Absolute valuesqrt(x)- Square rootpow(x, y)- Power functionmax(...)- Maximum valuemin(...)- Minimum value
String Functions
upper(s)- Convert to uppercaselower(s)- Convert to lowercasesplit(s, sep)- Split stringjoin(arr, sep)- Join array elementslen(obj)- Get length
Web Functions
html_element(tag, content, attrs)- Create HTML elementscss_style(selector, rules)- Generate CSScreate_page(title, body, css)- Build complete HTML pagesweb_serve(content, port)- Start web server
๐ฆ Package Management
Install packages:
veyra pm install math
veyra pm list
๐ Project Structure
veyra/
โโโ src/veyra/ # Core language implementation
โ โโโ __init__.py
โ โโโ cli.py # Command line interface
โ โโโ lexer.py # Lexical analysis
โ โโโ parser.py # Syntax parsing
โ โโโ interpreter.py # Runtime execution
โ โโโ pm.py # Package manager
โ โโโ lib/ # Installed packages
โโโ examples/ # Example programs
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ README.md
๐งช Running Tests
pip install -e .[test]
pytest tests/
๐ Documentation
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with Python
- Inspired by modern programming languages
- Community-driven development
๐ Contact
- GitHub: @nishal21
- Issues: GitHub Issues
Veyra - Making web development fun and accessible! ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file veyra-0.1.1.tar.gz.
File metadata
- Download URL: veyra-0.1.1.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1985116787df1c9146e66a5fea37641c21441e23a9a2abb0aa09a4d09ed8184
|
|
| MD5 |
a4159af670b303c40641cb6a49fbe19a
|
|
| BLAKE2b-256 |
344275b6d9e3e32ae86130f258e2f98cfc628a41cac46b846485300968f27c85
|
File details
Details for the file veyra-0.1.1-py3-none-any.whl.
File metadata
- Download URL: veyra-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e6cfb1f7dbfe0ccf76b1db247a7d929dab2fa679e49963821311bfbf0eff2ba
|
|
| MD5 |
5e5ef803512b6e10c4ecaf8a40ebd334
|
|
| BLAKE2b-256 |
2d81c15cda4c86ac22af27cadfadb1b78a63f33708ece8e6478fb7fa955472b2
|