Skip to main content

grikod3 (Grikod, Gri Kod, Gray Code, GrayCode): binary ↔ grikod


grikod3 logo

DOI

WorkflowHub DOI

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Open Source AGPL-3.0-or-later License

Python CI codecov Documentation Status Binder PyPI version PyPI Downloads Linted with Ruff


PyPI PyPI version
Conda conda-forge version
DOI DOI
License: AGPL-3.0-or-later License


A Python library for converting binary numbers to Gray Code with ease.


Tanım (Türkçe)

Gri Kod: grikod3 İkili sayıları Gri Koda çevirir.

Description (English)

Gri Kod: grikod3 converts binary numbers to Gray Code.


Kurulum (Türkçe) / Installation (English)

Python ile Kurulum / Install with pip, conda, mamba

pip install grikod3 -U
python -m pip install -U grikod3
conda install bilgi::grikod3 -y
mamba install bilgi::grikod3 -y
- pip uninstall grikod3 -y
+ pip install -U grikod3
+ python -m pip install -U grikod3

PyPI

Test Kurulumu / Test Installation

pip install -i https://test.pypi.org/simple/ grikod3 -U

Github Master Kurulumu / GitHub Master Installation

Terminal:

pip install git+https://github.com/WhiteSymmetry/grikod3.git

Jupyter Lab, Notebook, Visual Studio Code:

!pip install git+https://github.com/WhiteSymmetry/grikod3.git
# or
%pip install git+https://github.com/WhiteSymmetry/grikod3.git

Kullanım (Türkçe) / Usage (English)

import grikod3
grikod3.__version__
import grikod3
grikod3.ikili_2_gri_kod("1010")
import grikod3

def main():
    # Binary numbers: ikili sayılar
    binary_numbers = ["0", "1", "10", "11", "100", "101", "1111"]

    for binary in binary_numbers:
        try:
            gray_code = grikod3.ikili_2_gri_kod(binary)
            print(f"Binary: İkili: {binary} -> Gri Kod: {gray_code}")
        except grikod3.InvalidBinaryError as e:
            print(f"İkili: {binary} -> Hata: {e}")

if __name__ == "__main__":
    main()
Binary: İkili: 0 -> Gri Kod: 0
Binary: İkili: 1 -> Gri Kod: 1
Binary: İkili: 10 -> Gri Kod: 11
Binary: İkili: 11 -> Gri Kod: 10
Binary: İkili: 100 -> Gri Kod: 110
Binary: İkili: 101 -> Gri Kod: 111
Binary: İkili: 1111 -> Gri Kod: 1000


#Input: 100
#Output example
#000:000
#001:001
#010:011
#011:010
#100:110
#101:111
#110:101
#111:100

Graycode-Binary & Binary-Graycode

from grikod2 import ikili_2_gri_kod
grikod2.ikili_2_gri_kod("1010")
from grikod3 import ikili_2_gri_kod, grikod2ikili, run_interactive_converter
# Örnek kullanımlar:
print(grikod2ikili("1011"))   # Çıktı: "1101" (doğrulama: 1011 gri kodu 1101 ikiliğe denk gelir)
print(grikod2ikili("0"))      # "0"
print(grikod2ikili("111"))    # "101"
from grikod3 import ikili_2_gri_kod, grikod2ikili, run_interactive_converter
run_interactive_converter()
import grikod3

def main():
    print("🌟 Gri Kod Dönüştürücü - grikod3 Paketi ile")
    print("Geçerli bir ikili sayı girin (örneğin: 1101)")
    print("Çıkmak için 'q' yazın.\n")

    while True:
        user_input = input("İkili sayı: ").strip()

        if user_input.lower() == 'q':
            print("👋 Çıkılıyor. İyi günler!")
            break

        try:
            gray_code = grikod3.ikili_2_gri_kod(user_input)
            print(f"✅ Gri Kod: {gray_code}\n")
        except grikod3.InvalidBinaryError as e:
            print(f"❌ Giriş Hatası: {e}\n")
        except Exception as e:
            print(f"⚠️ Beklenmeyen hata: {e}\n")

if __name__ == "__main__":
    main()
import grikod3

if __name__ == "__main__":
    print("🚀 grikod3 Etkileşimli Moduna Hoş Geldiniz!")
    grikod3.run_interactive_converter()

Development

# Clone the repository
git clone https://github.com/WhiteSymmetry/grikod3.git
cd grikod3

# Install in development mode
python -m pip install -ve . # Install package in development mode

# Run tests
pytest

Notebook, Jupyterlab, Colab, Visual Studio Code
!python -m pip install git+https://github.com/WhiteSymmetry/grikod3.git

Citation

If this library was useful to you in your research, please cite us. Following the GitHub citation standards, here is the recommended citation.

BibTeX

APA

Keçeci, M. (2025). grikod3 [Data set]. WorkflowHub. https://doi.org/10.48546/workflowhub.datafile.13.1

Keçeci, M. (2025). grikod3. GitHub, PYPI, Anaconda, Zenodo. https://doi.org/10.5281/zenodo.15352206

Chicago

Keçeci, Mehmet. grikod3 [Data set]. WorkflowHub. https://doi.org/10.48546/workflowhub.datafile.13.1

Keçeci, Mehmet. "grikod3". Zenodo, 06 Mayıs 2025. https://doi.org/10.5281/zenodo.15352206

Lisans (Türkçe) / License (English)

This project is licensed under the AGPL-3.0-or-later License.

FOSSA Status

Pixi:

Pixi

pixi init grikod3

cd grikod3

pixi workspace channel add https://repo.prefix.dev/bilgi --prepend

✔ Added https://repo.prefix.dev/bilgi

pixi add grikod3

✔ Added grikod3 >=0.1.0,<2

pixi install

pixi shell

pixi run python -c "import grikod3; print(grikod3.version)"

Çıktı: 0.1.0

pixi remove grikod3

conda install -c https://prefix.dev/bilgi grikod3

pixi run python -c "import grikod3; print(grikod3.version)"

Çıktı: 0.1.0

pixi run pip list | grep grikod3

grikod3 0.1.0

pixi run pip show grikod3

Name: grikod3

Version: 0.1.0

Summary: Converts binary numbers to Gray Code. grikod3 (Gray Code, Grey Code)

Home-page: https://github.com/WhiteSymmetry/grikod3

Author: Mehmet Keçeci

Author-email: Mehmet Keçeci <...>

License: AGPL-3.0-or-later License

Copyright (c) 2025 Mehmet Keçeci

Metadata

Release files for grikod3 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grikod3 0.1.7
File Size Uploaded
grikod3-0.1.7.tar.gz 1.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for grikod3 0.1.7
File
grikod3-0.1.7-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
grikod3-0.1.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
grikod3-0.1.7-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
grikod3-0.1.7-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
grikod3-0.1.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
grikod3-0.1.7-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
grikod3-0.1.7-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
grikod3-0.1.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
grikod3-0.1.7-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
grikod3-0.1.7-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
grikod3-0.1.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
grikod3-0.1.7-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 20.2 MB

Release files / grikod3-0.1.7.tar.gz

Download URL grikod3-0.1.7.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
fed7ed5b44748cc0ea4e326fc6b93d7362d9d83673a23b1a473a5ff8535b2566
BLAKE2b-256 checksum
How to use checksums
db624a833883b8d8ba021bd144ed1c160d798b4658a85ec541505129478b4e95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp314-cp314-win_amd64.whl

Download URL grikod3-0.1.7-cp314-cp314-win_amd64.whl
Size 1.6 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
626255bf9d25d34a7a9ef8791209201cd222a5497c1be941163ec01644093ed1
BLAKE2b-256 checksum
How to use checksums
15a17dbadcf1062c9eb54cf466ce94fe255dcd3f513cf520ada113f0f08c94ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL grikod3-0.1.7-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 1.6 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
91f8a7a0cb9b909881406358001be7a9db25ff863f05eacb560d25236e1c5f60
BLAKE2b-256 checksum
How to use checksums
ec9a17e4a85c99695f2364f00a24d60ed23ea41fdb1a611f3b6bb67f9a548d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp314-cp314-macosx_11_0_arm64.whl

Download URL grikod3-0.1.7-cp314-cp314-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8a09b6aec90670d644e04f8405fa6d1220a49eb8e5b438b331a1e74a9b86d0dd
BLAKE2b-256 checksum
How to use checksums
7a4df9c5dac5b378f4975252e7ef6687a016a4141f0b47746ab7db2398ee7491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp313-cp313-win_amd64.whl

Download URL grikod3-0.1.7-cp313-cp313-win_amd64.whl
Size 1.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cdaa20878fbadfe09faa977e5bdde627287872bbe7215085512f699d7e246f04
BLAKE2b-256 checksum
How to use checksums
a3efc49261f7610bcaeea0ce8aa270812eddaec1f8d0c3636b462ea70ac893a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL grikod3-0.1.7-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 1.6 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
609039bdd3de1dbfbb46a03f198e1ce2da0326ca7c183ae2b3b3e48e3421c2f9
BLAKE2b-256 checksum
How to use checksums
737d93a128804682699c3f50da769b42e5d82859569f89cc702672dff3a4744b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp313-cp313-macosx_11_0_arm64.whl

Download URL grikod3-0.1.7-cp313-cp313-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ac0b491b9f3e36dbaeea87632b0cdd3584c75c7ca6bc07a19877693c348557a3
BLAKE2b-256 checksum
How to use checksums
02f907b62d79e5cfd125c9741a12ddcde9ff42e05716c00f0f638431a938033c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp312-cp312-win_amd64.whl

Download URL grikod3-0.1.7-cp312-cp312-win_amd64.whl
Size 1.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9b384bd530c99e62fc024c92433afc067a9b01ab670b08bd3c5c356b1091bdbf
BLAKE2b-256 checksum
How to use checksums
59e7114406d9e53837d0179118b03565e72c3389a04c6ded75aa76891e5b2ef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL grikod3-0.1.7-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f1657ca3a8650f000138b915be5a05c8240b1efb271d7b4f33dd9b396a7307e7
BLAKE2b-256 checksum
How to use checksums
d373c33b7667c7022424dc626faf7b28542bc15caeb3327fa3359256e706cc26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp312-cp312-macosx_11_0_arm64.whl

Download URL grikod3-0.1.7-cp312-cp312-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c1078adca16442f4a01a31eb790ec459cc7c999e5ba57d22b232c2d06ae3ea33
BLAKE2b-256 checksum
How to use checksums
7e3d36f20f02fa31aa84e2231742eb4ac39f3a0fe62bbb1a57af81aa94cb1401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp311-cp311-win_amd64.whl

Download URL grikod3-0.1.7-cp311-cp311-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e9e25ad0cd427ed03f80f43313e0ab6da92eddc2d5265cfcdab7c2c60876cee2
BLAKE2b-256 checksum
How to use checksums
3a2dae1f3b22d00b350e67ca37f1194f4b35bad65c38d89f2987620185e1be77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL grikod3-0.1.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
cebbcf8292c1288d8cb4b6a45d82974c04213407b406722254aa237ff7938c9c
BLAKE2b-256 checksum
How to use checksums
363458c98523d71fb2c5729a82b532cb97e66d6a312eabfcbe64b1c6de9f460e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / grikod3-0.1.7-cp311-cp311-macosx_11_0_arm64.whl

Download URL grikod3-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d4a313dbd5090bae353227314bc9c947184f9db7b25b49b1caf8deb4cb4930ff
BLAKE2b-256 checksum
How to use checksums
71e661f247f76f11733292f40efa4eefc197f9e6a2ef35ba2ce21e6794900392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.7 This release

13 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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