ecode-0.1.5
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ecode-0.1.5 |
| نام | ecode |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | ['Emoji Generator'] |
| ایمیل نگهدارنده | ['ultimate.emoji.gen@gmail.com'] |
| نویسنده | Emoji Generator |
| ایمیل نویسنده | ultimate.emoji.gen@gmail.com |
| آدرس صفحه اصلی | https://github.com/emoji-gen/ecode-py |
| آدرس اینترنتی | https://pypi.org/project/ecode/ |
| مجوز | MIT |
# ecode-py
[](https://travis-ci.com/emoji-gen/ecode-py)
[](https://codecov.io/gh/emoji-gen/ecode-py)
[](https://badge.fury.io/py/ecode)
:musical_score: The emoji code utilities for Python
## Requirements
- Python 3.6 or later
## Getting started
### Pip
```shell script
$ pip install ecode
```
### Poetry
```shell script
$ poetry add ecode
```
## Usage
### Encoding
```python
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
```python
from ecode import EcodeDecoder
ecode = EcodeDecoder().decode('BA0hzxI0VniavN7wYWIKYw')
print(ecode.text) #=> 'ab\nc'
```
## Development
You should install [Poetry](https://python-poetry.org/) first to develop.
```shell script
$ pip install poetry
```
### Install requirements
```shell script
$ poetry install
```
### Upgrade requirements
```shell script
$ poetry update
```
### Test
```shell script
$ poetry run pytest # Test
$ poetry run mypy -p ecode # Type checking
```
### Publish
```shell script
$ ./scripts/publish-pypi.sh
```
## Ported projects
|Name|Language|
|---|---|
|[ecode-java](https://github.com/emoji-gen/ecode-java)|Java|
|[ecode-js](https://github.com/emoji-gen/ecode-js)|JavaScript|
## License
MIT © [Emoji Generator](https://emoji-gen.ninja)
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl ecode-0.1.5:
pip install ecode-0.1.5.whl
نصب پکیج tar.gz ecode-0.1.5:
pip install ecode-0.1.5.tar.gz