{"id":13813712,"url":"https://github.com/heuer/segno","last_synced_at":"2025-05-14T21:04:30.724Z","repository":{"id":37849179,"uuid":"64920252","full_name":"heuer/segno","owner":"heuer","description":"Python QR Code and Micro QR Code encoder","archived":false,"fork":false,"pushed_at":"2025-03-12T22:12:16.000Z","size":3253,"stargazers_count":662,"open_issues_count":15,"forks_count":60,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-13T17:46:43.023Z","etag":null,"topics":["barcode","iso-18004","matrix-barcode","micro-qr-code","micro-qrcode","python","python-qrcode","qr-code","qr-generator","qrcode","segno","structured-append"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/segno/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heuer.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-04T09:08:52.000Z","updated_at":"2025-04-13T02:23:21.000Z","dependencies_parsed_at":"2023-10-21T11:42:44.795Z","dependency_job_id":"ca4a6607-9cf2-44e9-a16a-46127708d7af","html_url":"https://github.com/heuer/segno","commit_stats":{"total_commits":1353,"total_committers":12,"mean_commits":112.75,"dds":"0.018477457501847705","last_synced_commit":"39c93b18eefcc0cce13867aeb013938a8afb1100"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heuer%2Fsegno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heuer%2Fsegno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heuer%2Fsegno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heuer%2Fsegno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heuer","download_url":"https://codeload.github.com/heuer/segno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227605,"owners_count":22035668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode","iso-18004","matrix-barcode","micro-qr-code","micro-qrcode","python","python-qrcode","qr-code","qr-generator","qrcode","segno","structured-append"],"created_at":"2024-08-04T04:01:26.833Z","updated_at":"2025-05-14T21:04:30.671Z","avatar_url":"https://github.com/heuer.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"QR Code encoder and Micro QR Code encoder\n=========================================\n\nPure Python QR Code generator with no dependencies.\n\nThis package implements ISO/IEC 18004:2015(E) \"QR Code bar code symbology\nspecification\" and produces QR Codes and Micro QR Codes with nearly no effort.\nIt supports the `Structured Append mode \u003chttps://segno.readthedocs.io/en/stable/structured-append.html\u003e`_\nwhich splits a message across several QR codes.\n\nSegno (Italian for \"sign\" / \"symbol\") provides several serialization formats\nlike Scalable Vector Graphics (SVG), Encapsulated PostScript (EPS),\nPortable Network Graphics (PNG), Portable Document Format (PDF), Netpbm (PAM, PBM, PPM),\nLaTeX (PGF/TikZ), X PixMap (XBM), and X Bitmap (XPM) etc.\nNone of these serializers require an external lib.\nFurther, it provides several high level functions to create QR Codes which encode\n`contact data (vCard, MeCard) \u003chttps://segno.readthedocs.io/en/stable/contact-information.html\u003e`_,\n`EPC QR Codes \u003chttps://segno.readthedocs.io/en/stable/epc-qrcodes.html\u003e`_,\nor `WIFI QR Codes \u003chttps://segno.readthedocs.io/en/stable/special-qrcode-factories.html#create-a-qr-code-for-a-wifi-configuration\u003e`_.\n\nThe project provides more than 1500 test cases (coverage \u003e= 98%) to verify a\nstandard conform QR Code and Micro QR Code generation acc. to ISO/IEC 18004:2015(E).\n\n\nUnique features\n---------------\n* Pure Python QR Code generator \n* No dependencies\n* A lot of `serialization formats \u003chttps://segno.readthedocs.io/en/stable/serializers.html#available-serializers\u003e`_ (SVG, PNG, EPS, PDF, ...)\n* `Fastest (pure Python) QR Code encoder \u003chttps://segno.readthedocs.io/en/stable/comparison-qrcode-libs.html#performance\u003e`_\n* Micro QR Codes\n* `Structured Append mode \u003chttps://segno.readthedocs.io/en/stable/structured-append.html\u003e`_\n* `Hanzi mode \u003chttps://segno.readthedocs.io/en/stable/qrcode-modes.html#hanzi-mode\u003e`_\n* `Command line interface \u003chttps://segno.readthedocs.io/en/stable/command-line.html\u003e`_\n* `Simple, user-friendly API \u003chttps://segno.readthedocs.io/en/stable/make.html\u003e`_\n\n.. code-block:: python\n\n    import segno\n    qrcode = segno.make('Yellow Submarine')\n    qrcode.save('yellow-submarine.png')\n\n* `Colorful QR codes \u003chttps://segno.readthedocs.io/en/stable/colorful-qrcodes.html\u003e`_\n\n  .. image:: https://github.com/heuer/segno/raw/master/docs/_static/colorful/qrcode_yellow-submarine.png\n    :alt: Colorful 7-H QR code encoding \"Yellow Submarine\"\n\n  ... works also with Micro QR codes\n\n  .. image:: https://github.com/heuer/segno/raw/master/docs/_static/colorful/micro_qrcode_rain.png\n    :alt: Colorful M4-Q Micro QR code encoding \"Rain\"\n\n* `Artistic QR Codes \u003chttps://segno.readthedocs.io/en/stable/artistic-qrcodes.html\u003e`_\n  (requires the `qrcode-artistic \u003chttps://github.com/heuer/qrcode-artistic\u003e`_ plug-in)\n\n  .. image:: https://github.com/heuer/segno/raw/master/docs/_static/artistic/letitbe.jpg\n    :alt: Animated 3-H QR code encoding \"The Beatles -- Let It Be\"\n\n  ... animated QR codes are supported as well\n\n  .. image:: https://github.com/heuer/segno/raw/master/docs/_static/artistic/abbey-road.webp\n    :alt: Animated 4-H QR code encoding \"The Beatles -- Abbey Road\"\n\n\nInstallation\n------------\n\nUse ``pip`` to install segno from PyPI::\n\n    $ pip install segno\n\n\nconda-forge\n^^^^^^^^^^^\n\nThe library is also available at `conda-forge \u003chttps://conda-forge.org/\u003e`_\n(`conda-forge project page \u003chttps://anaconda.org/conda-forge/segno\u003e`_)::\n\n    $ conda install -c conda-forge segno\n\n\nDebian\n^^^^^^\n\n::\n\n    $ apt-get install python3-segno\n\n\nArch Linux\n^^^^^^^^^^\n\n::\n\n    $ pacman -S python-segno\n\n\n\nUsage\n-----\n\nCommand line\n^^^^^^^^^^^^\n\nThe command line script prints a QR code to the terminal::\n\n    $ segno \"Comfortably Numb\"\n\n\nTo serialize a QR code, use the \"output\" argument::\n\n    $ segno -o=raincoat.svg \"Famous Blue Raincoat\"\n    $ segno --scale 10 --dark darkblue --border 0 --output=fire.svg \"Who by Fire\"\n    $ segno --scale 10 --light transparent --output=miracle.png \"Waiting for the Miracle\"\n\n\n\nLibrary\n^^^^^^^\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import segno\n    \u003e\u003e\u003e # Let Segno choose the minimal version and an optimal (maximal) error\n    \u003e\u003e\u003e # level without changing the minimal version\n    \u003e\u003e\u003e qrcode = segno.make('Up Jumped the Devil')\n    \u003e\u003e\u003e qrcode.designator  # Returns the QR code version and the error correction level\n    '2-Q'\n    \u003e\u003e\u003e qrcode.save('up-jumped-the-devil.png')  # Save as PNG\n    \u003e\u003e\u003e qrcode.save('up-jumped-the-devil-2.png', scale=10)  # Scaling factor 10\n    \u003e\u003e\u003e qrcode.save('up-jumped-the-devil-3.png', light=None)  # Transparent light modules\n    \u003e\u003e\u003e qrcode.save('up-jumped-the-devil.pdf', scale=10)  # Save as PDF\n    \u003e\u003e\u003e # SVG drawing the dark modules in \"dark blue\"\n    \u003e\u003e\u003e qrcode.save('up-jumped-the-devil.svg', scale=10, dark='darkblue')\n\n\nIf the content to encode is small enough, a Micro QR code is generated:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import segno\n    \u003e\u003e\u003e qrcode = segno.make('RAIN')\n    \u003e\u003e\u003e qrcode.is_micro\n    True\n    \u003e\u003e\u003e qrcode.designator\n    'M2-M'\n\n\nIf this behaviour is not desired, the user may set ``micro`` to ``False``\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import segno\n    \u003e\u003e\u003e qrcode = segno.make('RAIN', micro=False)\n    \u003e\u003e\u003e qrcode.is_micro\n    False\n    \u003e\u003e\u003e qrcode.designator\n    '1-H'\n\n\nOr use the factory functions ``segno.make_qr()`` which generates always QR codes\n(never Micro QR codes) or ``segno.make_micro()`` which returns always\nMicro QR codes (or raises an error if the content is too large for a Micro QR code).\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import segno\n    \u003e\u003e\u003e qrcode_micro = segno.make_micro('THE BEATLES')\n    \u003e\u003e\u003e qrcode_micro.designator\n    'M3-M'\n    \u003e\u003e\u003e qrcode = segno.make_qr('THE BEATLES')  # Same content but enforce a QR Code\n    \u003e\u003e\u003e qrcode.designator\n    '1-Q'\n    \u003e\u003e\u003e # This won't work since the data does not fit into a Micro QR Code M1 - M4\n    \u003e\u003e\u003e micro_qrcode = segno.make_micro('Nick Cave and the Bad Seeds')\n    Traceback (most recent call last):\n        ...\n    DataOverflowError: Data too large. No Micro QR Code can handle the provided data\n\n\nAll factory functions use the same parameters to specify the desired error\nlevel, version, data mask etc., see `Segno's documentation`_ for details.\n\n\nDocumentation\n-------------\nRead the online documentation at \u003chttps://segno.readthedocs.io/\u003e\n\n\nTrademark\n---------\n\"QR Code\" and \"Micro QR Code\" are registered trademarks of DENSO WAVE INCORPORATED.\n\n\n.. _Segno's documentation: https://segno.readthedocs.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheuer%2Fsegno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheuer%2Fsegno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheuer%2Fsegno/lists"}