ecode-py
🎼 The emoji code utilities for Python
Requirements
- Python 3.6 or later
Getting started
Pip
$ pip install ecode
Poetry
$ poetry add ecode
Usage
Encoding
from ecode import *
ecode = Ecode(
locale=EcodeLocale.EN,
flags=frozenset(EcodeFlag.SIZE_FIXED, EcodeFlag.STRETCH),
align=EcodeAlign.CENTER,
size=EcodeSize.XHDPI,
format=EcodeFmt.WEBP,
font_id=0xcf,
foreground_color=0x12345678,
background_color=0x9abcdef0,
text='ab\nc'
)
code = EcodeEncoder().encode(ecode)
print(code) #=> 'BA0hzxI0VniavN7wYWIKYw'
Decoding
from ecode import EcodeDecoder
ecode = EcodeDecoder().decode('BA0hzxI0VniavN7wYWIKYw')
print(ecode.text) #=> 'ab\nc'
Development
You should install Poetry first to develop.
$ pip install poetry
Install requirements
$ poetry install
Upgrade requirements
$ poetry update
Test
$ poetry run pytest # Test
$ poetry run mypy -p ecode # Type checking
Publish
$ ./scripts/publish-pypi.sh
Ported projects
| Name | Language |
|---|---|
| ecode-java | Java |
| ecode-js | JavaScript |
License
MIT © Emoji Generator
Metadata
Release files for ecode 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecode-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for ecode-0.1.5-py3-none-any.whl |
Release files / ecode-0.1.5-py3-none-any.whl
| Download URL | ecode-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e188921c2ff52acd64ad0e5f477350534e27ec82eb883e9ecfc79199bb661894
|
|
BLAKE2b-256 checksum How to use checksums |
56c6b272e496e11416f8a910557e1e1a9c1975b802b4ca5b195bbf12597b39ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
|
Security for ecode 0.1.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.