Skip to main content

Check out the official documentation here.

Note: Version 1.6.1 had a critical division by zero error that wasn't caught.

Examples

You'll find comprehensive examples in the examples/ directory that cover C imports, header imports, 64-bit support, and standard library usage:

File Description
examples/c_import_example.cpy Importing and calling functions from C source files
examples/example_math.c C source with math utility functions for the C import example
examples/h_import_example.cpy Importing functions declared in C header files
examples/example_functions.h / example_functions.c Header and implementation for the H import example
examples/64bit_example.cpy Comprehensive int64/uint64 arithmetic, hex literals, type promotion
examples/c_library_imports.cpy Using built-in C libraries (stdio, stdlib, math, string, time)
examples/mixed_features.cpy Combines C imports, H imports, 64-bit, structs, pointers, linked lists
examples/mixed_helpers.c / mixed_helpers.h Supporting C/header files for the mixed features example
examples/test.cpy macOS event tap example that intercepts keyboard events using ApplicationServices framework

You can also import .cpy files — the examples show how to use import "other.cpy" to bring in public functions and structs from other Cpy files.

Run any example with:

python source/mainpie.py --jit examples/<filename>.cpy

Note

Cpyte is experimental software. The compiler is continuously tested with fuzzing, and we're still discovering and fixing correctness bugs. While many programs compile and run correctly, I can't make any guarantees about correctness or stability.

If you decide to use Cpyte, always use the latest version — older versions have bugs that are pretty easy to run into.

Download files

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

Source Distribution

cpyte-1.8.5.tar.gz (80.7 kB view details)

Uploaded Source

Built Distribution

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

cpyte-1.8.5-py3-none-any.whl (81.6 kB view details)

Uploaded Python 3

File details

Details for the file cpyte-1.8.5.tar.gz.

File metadata

  • Download URL: cpyte-1.8.5.tar.gz
  • Upload date:
  • Size: 80.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for cpyte-1.8.5.tar.gz
Algorithm Hash digest
SHA256 bf1d3bce375814618dd1e6755cb40f76cc1836fe167bda187f3b2785dee70469
MD5 848bf26a1f5e127be40da8f8c3869840
BLAKE2b-256 fca909fe9702eaf9451cc15cd2c35e758c3c1b6e461a288d28a351953e64440e

See more details on using hashes here.

File details

Details for the file cpyte-1.8.5-py3-none-any.whl.

File metadata

  • Download URL: cpyte-1.8.5-py3-none-any.whl
  • Upload date:
  • Size: 81.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for cpyte-1.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8bf3e9ad0de9d0e35fde481c29633f907308ae1f8d5c7182bb137b8785d32e2c
MD5 6433139a7d8b98b27b0e28f756c6172f
BLAKE2b-256 35e74e2c1a565bfeba094b78eb0abc5a04fe2521abba9661ffc274a4e281a093

See more details on using hashes here.

Release history Release notifications | RSS feed

4.2.2

2 files

4.2.1

1 file

4.2.0

1 file

4.1.0

2 files

4.0.0

2 files

3.4.0

2 files

3.3.4

2 files

3.3.3

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.0

2 files

2.7.3

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

2.6.0

2 files

2.5.1

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.8.7

2 files

1.8.6

2 files

This release

1.8.5 This release

2 files

1.8.4

2 files

1.8.3

2 files

1.8.2

2 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