Skip to main content

Simple yet powerful Chilean and other tools written in Rust and Python.

Project description

cl-forge 🇨🇱

Simple yet powerful Chilean and other tools written in Rust and Python.

cl-forge provides a collection of high-performance utilities for common Chilean data formats and API integrations. The core logic is implemented in Rust for maximum speed, with a clean and easy-to-use Python interface.

Features

  • Verify: Efficiently validate and manipulate Chilean RUT/RUN and PPU (License Plates).
  • CMF API: A simple client to interact with the Chilean Financial Market Commission (CMF) API.
  • High Performance: Core logic written in Rust.
  • Lazy Loading: Submodules are loaded only when needed to keep the initial import fast.
  • Type Safety: Full type hints and .pyi stubs for excellent IDE support.

Installation

pip install cl-forge

Or using uv:

uv add cl-forge

Usage

Verification (RUT & PPU)

from cl_forge import verify

# Validate a RUT
is_valid = verify.validate_rut("12345678", "5")
print(f"RUT is valid: {is_valid}")

# Calculate RUT verifier
dv = verify.calculate_verifier("12345678")
print(f"Verifier digit: {dv}")

# Work with PPUs (License Plates)
ppu = verify.Ppu("PHZF55")
print(f"Normalized: {ppu.normalized}")  # PHZF55
print(f"Verifier: {ppu.verifier}")      # K
print(f"Complete: {ppu.complete}")      # PHZF55-K

CMF API Client

To use the CMF API, you need an API key. You can request one at CMF Chile.

from cl_forge.cmf import CmfClient

client = CmfClient(api_key="your_api_key_here")

# Get IPC data
ipc_data = client.get(path="/ipc")
print(ipc_data) # {'IPCs': [{'Valor': '-0,2', 'Fecha': '2025-12-01'}]}

See the CMF API documentation for details about the available endpoints.

Development

This project uses maturin to build the Rust extension.

Setup

  1. Clone the repository:

    git clone https://github.com/mschiaff/cl-forge.git
    cd cl-forge
    
  2. Install development dependencies (using uv):

    uv sync --all-groups
    
  3. Build the Rust extension in develop mode:

    uv run maturin develop
    

Running Tests

uv run pytest

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

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

cl_forge-0.3.0.tar.gz (35.4 kB view details)

Uploaded Source

Built Distributions

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

cl_forge-0.3.0-cp314-cp314-win_arm64.whl (2.6 MB view details)

Uploaded CPython 3.14Windows ARM64

cl_forge-0.3.0-cp314-cp314-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.14Windows x86-64

cl_forge-0.3.0-cp314-cp314-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cl_forge-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

cl_forge-0.3.0-cp313-cp313-win_arm64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows ARM64

cl_forge-0.3.0-cp313-cp313-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.13Windows x86-64

cl_forge-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cl_forge-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

cl_forge-0.3.0-cp312-cp312-win_arm64.whl (2.6 MB view details)

Uploaded CPython 3.12Windows ARM64

cl_forge-0.3.0-cp312-cp312-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.12Windows x86-64

cl_forge-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cl_forge-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

cl_forge-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cl_forge-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

Details for the file cl_forge-0.3.0.tar.gz.

File metadata

  • Download URL: cl_forge-0.3.0.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4d55d4a278918e2237d14ab68cb1d9f55a3a48f028aed2fb04913a2e74d6510b
MD5 041e1816540bdb282a5978ec99d9be72
BLAKE2b-256 5b9e6e15031ce49864841a0c0236b44c562ac3fb44f8cab9fe02cce5585401d4

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp314-cp314-win_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp314-cp314-win_arm64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.14, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp314-cp314-win_arm64.whl
Algorithm Hash digest
SHA256 5a291bf13c104a1b226c75a3d7b884a1a30d98688d6ff1cb90f26859904be6e0
MD5 0dfc9101d371d9ddc90469bcb0822c8b
BLAKE2b-256 7d6bfda4d68a6c81d4cdd48241cf522f2b8677cba2572cb25bbc14611de2104d

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5f718c3fef052332c29f06031d3a507308d29c6ca3e787ccb574d68bef0c365f
MD5 54c13fbf76b6ab3ef40c4ca1523b9ea0
BLAKE2b-256 19625fb74a0c1cf6e765a3957e5999a7df480195641d5176b377e8ecbd56053d

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c0bd9f198b21bd7a27cbf176fa78ad23fc5a0b1b6e4e9528888f80a0ba95a357
MD5 6f15ea808c8180c7e7c048dde601fcaf
BLAKE2b-256 e8691eb851e39bf28f4bcd26d065d6a8c2167bf554f940c43000de6c0ae18a90

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.14, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d8b668438801e2a71595d0ae2856d7938156dde5ff00b4808e4b66b02464702e
MD5 9db6aad1a458788b8d75f073f676cc35
BLAKE2b-256 58854f0392007c89aa849e83d40d8acd9a9b1484172f8e3d3e7dc9d7f5e9aac9

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.13, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 3465f61176c29aeeb0d3a0f339d45bdeb73c4bb7f0a5ccfce013108cea75d88e
MD5 8023d08bfb2110fea0da86b695e2a362
BLAKE2b-256 2cfcaca93f1e4a3e1d68edfacee71e06551661557fff357039f72c728a658204

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5ae720a5e847d6d6bf419b3c06af453a65339cc9c8ec8cc467dc1579fa78e6ad
MD5 7d0de6087c67c169ced3f7f95c1c503b
BLAKE2b-256 3824a876a6b6b66abccaac5c14d02ec498c6ef62a94f45d51e5f0ee596b5a529

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abd88bc7a76653bada070d79fc6032bca2324834cefb0b24b54ca2200b1c895d
MD5 64b07d88771f28d4803946aa6454760f
BLAKE2b-256 075bb7a0913d047b40472cb7a97051c453397f686843c287e74b6bc50885c7ec

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.13, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3bf993b895a90b7850ac2dbb203c9d1016a8fc7326c31a2f497d4a31f5ac4c5e
MD5 0f7e59f8cfefcb38d1393f0574a47830
BLAKE2b-256 2d4017273484a7a78582b48e76a9f616ed4fa62c399d45d0ac02fc18b910e1cb

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.12, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 16839d1b099b035b2bde83ed5a05d4b2fffaf14165fd67329a96d28500dc0563
MD5 0f83aaefd48a36111422e731a775b467
BLAKE2b-256 a3d63d6b594e4e71fa0280accc1e9b5d77a27d34a058d25bc20ace7ce7c9c870

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 54db6c126f9467a8128e5597c12e3a3e5b07312c9f48e085334c3afbdab0d406
MD5 84ca9398072faa5cad69c3ffabf69794
BLAKE2b-256 768ce7779d8f737178ba83f7174546a590712dc3f786d61040157bed7151f297

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6079bd0bdf61a039a282b1bcbc74c4f4f61fd0d52293df258be120836873e31
MD5 8bf479d8608fdefe8185c9492cfa437b
BLAKE2b-256 7441553474762b1658f83eea1becd27d71a327eb4845a8725ae0e77f23e9f70c

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.12, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 38e2e4ccf9922c9d4b755a6506f962ed381d4696a6a7c3b69d5c125cd1faeec9
MD5 27e6f3d00130daf8c5cc22d470919cef
BLAKE2b-256 466b899c2bad4064be178b4590460c8f8d244738ed54ac6b93fa104d3a8ed896

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 98547f9198f88c1c719998bffbc4957cc57091dfea48f51ccf6b31642145fe09
MD5 b1aeba57ea95dc44176ec58dde3cda7d
BLAKE2b-256 caa039d628c45625be3cbcc5bc8371074d2b58b35b2f61cac3caff6447f162a7

See more details on using hashes here.

File details

Details for the file cl_forge-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: cl_forge-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cl_forge-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 62d775904806b1b06c96c79ea1fbac991166c79485401f9017ddb74f59adf8ec
MD5 037f15960cc9c78be85c93ebd27fd8d2
BLAKE2b-256 d71379eee4e16d420384f4222ea0010a73da3431c4b366f64f8929828b521bf1

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