Skip to main content

Veyra Programming Language

CI PyPI License

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 value
  • sqrt(x) - Square root
  • pow(x, y) - Power function
  • max(...) - Maximum value
  • min(...) - Minimum value

String Functions

  • upper(s) - Convert to uppercase
  • lower(s) - Convert to lowercase
  • split(s, sep) - Split string
  • join(arr, sep) - Join array elements
  • len(obj) - Get length

Web Functions

  • html_element(tag, content, attrs) - Create HTML elements
  • css_style(selector, rules) - Generate CSS
  • create_page(title, body, css) - Build complete HTML pages
  • web_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.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. 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


Veyra - Making web development fun and accessible! 🎉

Release files for veyra 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veyra 0.2.0
File Size Uploaded
veyra-0.2.0.tar.gz 31.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for veyra 0.2.0
File Interpreter ABI Platform
veyra-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.4 kB

Release files / veyra-0.2.0.tar.gz

Download URL veyra-0.2.0.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0aff53f6bd0c3bd1e0d5c8185a20aa2e3e235e31c489887c05e636d4493e1e4a
BLAKE2b-256 checksum
How to use checksums
9ff1156e801631ab13a81bb58ac4eca7e5600b33c66d4ea521ab9f45f999dd17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / veyra-0.2.0-py3-none-any.whl

Download URL veyra-0.2.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a359928ed6357d636933d20a7c4a9f0ee4ce1fa1b88e4d6fa953b6ddb4069c22
BLAKE2b-256 checksum
How to use checksums
b0e7275e04ff308c8ce059380283c828000238c84253614728f3c2cc78531f47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page