Veyra is a modern programming language designed for web development and rapid prototyping, featuring built-in web capabilities and a clean, readable syntax.
- 🚀 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 (matrix operations, neural network primitives)
- 🔧 Extensible: Easy to add new features and libraries
- 📚 Rich Standard Library: Math, string manipulation, file I/O, JSON, and utility functions
- 🏗️ Object-Oriented: Full class support with inheritance, methods, and instances
- 🛡️ Error Handling: Try/catch blocks for robust error management
- 🔄 Concurrency: Channel-based communication
- 🖥️ Interactive REPL: Multi-line input support for rapid prototyping
pip install veyragit clone https://github.com/nishal21/veyra.git
cd veyra
pip install -e .- Python 3.8+
Create a file hello.veyra:
fn main() {
println("Hello, Veyra!");
}
Run it:
veyra hello.veyrafn 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!
let message = "Hello";
let count = 42;
fn greet(name) {
return "Hello, " + name + "!";
}
if count > 10 {
println("Count is high");
} else {
println("Count is low");
}
while count > 0 {
println(count);
count = count - 1;
}
let numbers = [1, 2, 3, 4, 5];
let person = {"name": "Alice", "age": 30};
abs(x)- Absolute valuesqrt(x)- Square rootpow(x, y)- Power functionmax(...)- Maximum valuemin(...)- Minimum value
upper(s)- Convert to uppercaselower(s)- Convert to lowercasesplit(s, sep)- Split stringjoin(arr, sep)- Join array elementslen(obj)- Get length
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
Install packages:
veyra pm install math
veyra pm listveyra/
├── 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
pip install -e .[test]
pytest tests/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
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python
- Inspired by modern programming languages
- Community-driven development
- GitHub: @nishal21
- Issues: GitHub Issues
Veyra - Making web development fun and accessible! 🎉