Clyp
Clyp is an experimental programming language that transpiles to Python. It's designed with a clean and simple syntax, aiming to make coding more straightforward and readable.
Site at codesoft.is-a.dev/clyp/
Features
- Static-like Typing: Variables are declared with their types, providing clarity and robustness.
- Simplified Syntax: Uses
{}for blocks and;for newlines, similar to C-like languages. - Python Interoperability: Seamlessly uses Python libraries and functions.
- Standard Library: Comes with a handy set of built-in functions for common tasks.
Installation
To get started with Clyp, you need to have Python installed. Then, you can install Clyp using pip:
pip install clyp
Want to install from source? Clone the repository and run:
git clone https://github.com/clyplang/clyp.git
cd clyp
pip install -r requirements.txt
Usage
The Clyp CLI allows you to execute .clyp files directly from your terminal.
-
Run a file:
clyp go path/to/your/file.clyp
-
Check the version:
clyp --version -
Display help:
clyp --help
Language Syntax
Variables
Variables are declared with their type followed by the name and value.
int x = 10;
str message = "Hello, World!";
bool is_active = true;
Functions
Functions are defined using the def keyword, with type hints for arguments and a returns clause for the return type.
def greet(str name) returns None {
print("Hello, " + name);
}
Conditionals
Clyp uses if, else if, and else for conditional logic.
int a = 10;
if (a > 5) {
print("a is greater than 5");
} else {
print("a is not greater than 5");
}
Comments
Comments start with #.
# This is a single-line comment
Standard Library
Clyp includes a standard library with useful functions:
fetch(url: str): Fetches content from a URL.read_file(path: str): Reads a file's content.write_file(path: str, content: str): Writes content to a file.slugify(text: str): Converts a string into a URL-friendly slug.is_empty(value): Checks if a value is empty.is_prime(n: int): Checks if a number is prime.to_roman_numerals(num: int): Converts an integer to Roman numerals.
Development
To contribute to Clyp, you can set up a development environment:
pip install -r requirements-dev.txt
Run tests using pytest:
pytest
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for clyp 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clyp-2.1.0.tar.gz | 63.7 kB | Without provenance | Details for clyp-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clyp-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for clyp-2.1.0-py3-none-any.whl |
Total release size: 109.5 kB
Release files / clyp-2.1.0.tar.gz
| Download URL | clyp-2.1.0.tar.gz |
|---|---|
| Size | 63.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e7f09c7e5e3a8d327afb78be59d3e3ff8b9637ec12dac797a83f667ffe8b7ee
|
|
BLAKE2b-256 checksum How to use checksums |
d3382e844f9b0499ef0874128451d7aa280b21a9973380cdcd2ab8a46e042721
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / clyp-2.1.0-py3-none-any.whl
| Download URL | clyp-2.1.0-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
897ea0baca484ddfec10a0c61e9b50c8aafec70dc51b376b20f0ebfef75269ab
|
|
BLAKE2b-256 checksum How to use checksums |
c2cea068b4b3ef388eb4eac3f917a349728ffb915a33ef2cc3c1efbff71e475b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for clyp 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.