Skip to main content

A modern programming language for web development and rapid prototyping

Project description

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! ๐ŸŽ‰

Project details


Download files

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

Source Distribution

veyra-0.2.0.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veyra-0.2.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file veyra-0.2.0.tar.gz.

File metadata

  • Download URL: veyra-0.2.0.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for veyra-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0aff53f6bd0c3bd1e0d5c8185a20aa2e3e235e31c489887c05e636d4493e1e4a
MD5 22d2ac459f8c51cd2a6a47ac04fedb6a
BLAKE2b-256 9ff1156e801631ab13a81bb58ac4eca7e5600b33c66d4ea521ab9f45f999dd17

See more details on using hashes here.

File details

Details for the file veyra-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: veyra-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for veyra-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a359928ed6357d636933d20a7c4a9f0ee4ce1fa1b88e4d6fa953b6ddb4069c22
MD5 4fbad9732209f869d4e729a97dd9698e
BLAKE2b-256 b0e7275e04ff308c8ce059380283c828000238c84253614728f3c2cc78531f47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page