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.1.1.tar.gz (29.2 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.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

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

Hashes for veyra-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a1985116787df1c9146e66a5fea37641c21441e23a9a2abb0aa09a4d09ed8184
MD5 a4159af670b303c40641cb6a49fbe19a
BLAKE2b-256 344275b6d9e3e32ae86130f258e2f98cfc628a41cac46b846485300968f27c85

See more details on using hashes here.

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

Hashes for veyra-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e6cfb1f7dbfe0ccf76b1db247a7d929dab2fa679e49963821311bfbf0eff2ba
MD5 5e5ef803512b6e10c4ecaf8a40ebd334
BLAKE2b-256 2d81c15cda4c86ac22af27cadfadb1b78a63f33708ece8e6478fb7fa955472b2

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