Skip to main content

Nim extension for Python, example project

Project description

nym

https://img.shields.io/pypi/v/nym.svg https://img.shields.io/travis/gmagno/nym.svg Documentation Status

Nim extension for Python using nimporter, example project.

Usage

To install nym, run this command in your terminal:

$ pip install nym

To install from source:

$ git clone git@github.com:gmagno/nym.git && cd nym
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -U pip && pip install -r requirements_dev.txt
$ python -m nym.cli

To build:

$ make dist

To use nym:

from nym import fast, slow

start = time.time()
python_ret = slow.fib(33)
python_time = time.time() - start

restart = time.time()
nim_ret = fast.fib(33)
nim_time = time.time() - restart

print(f"python ret: {python_ret}")
print(f"python elapsed time: {python_time}")

print(f"nim ret: {nim_ret}")
print(f"nim elapsed time: {nim_time}")

History

0.1.1 (2022-05-14)

  • First release on PyPI.

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

nym-0.1.2.tar.gz (934.7 kB view details)

Uploaded Source

Built Distribution

nym-0.1.2-cp310-cp310-manylinux1_x86_64.whl (455.4 kB view details)

Uploaded CPython 3.10

File details

Details for the file nym-0.1.2.tar.gz.

File metadata

  • Download URL: nym-0.1.2.tar.gz
  • Upload date:
  • Size: 934.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for nym-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6844b81c6499267e8aa68ab3aaee2e802d655d751ac45fdf5b70563108fe4d9b
MD5 5af75c3a2eb4e0b4fe7cde1169880256
BLAKE2b-256 efa80cbcb77fd3910d15b92076365e045648dd44a56231be99aeaadd04147335

See more details on using hashes here.

File details

Details for the file nym-0.1.2-cp310-cp310-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for nym-0.1.2-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6bea31f1b4e14ccd8aa8da4b3730ab4fe51c41651843f163843d1c8fa3f67d94
MD5 26dad323e356cb9d4f50f4334810a1d6
BLAKE2b-256 4c362bc2505e3222c9f7d2194cf4222ba0b90b9f8b200666cab2fbbb6831ee81

See more details on using hashes here.

Supported by

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