Skip to main content

avatars

Project description

https://travis-ci.org/007gzs/avatars.svg?branch=master https://img.shields.io/pypi/v/avatars.svg

多种风格SVG头像生成工具

https://github.com/007gzs/avatars/raw/master/resource/male_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/female_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/identicon_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/bottts_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/initials_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/gridy_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_female_0.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_male_0.svg?sanitize=true
https://github.com/007gzs/avatars/raw/master/resource/male_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/female_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/identicon_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/bottts_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/initials_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/gridy_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_female_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_male_1.svg?sanitize=true
https://github.com/007gzs/avatars/raw/master/resource/male_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/female_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/identicon_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/bottts_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/initials_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/gridy_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_female_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/avatio_male_2.svg?sanitize=true

安装

目前 Avatars 支持的 Python 环境有 2.7, 3.4, 3.5, 3.6, 3.7 和 pypy。

为了简化安装过程,推荐使用 pip 进行安装

pip install avatars

升级 Avatars 到新版本:

pip install -U avatars

如果需要安装 GitHub 上的最新代码:

pip install https://github.com/007gzs/avatars/archive/master.zip

使用

代码样例:

from avatars.sprite import *
print(MaleSprite().create("张三"))
print(FemaleSprite().create("张三"))
print(IdenticonSprite().create("张三"))
print(BotttsSprite().create("张三"))
print(InitialsSprite().create("张三"))

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

avatars-0.1.1.tar.gz (91.6 kB view details)

Uploaded Source

Built Distribution

avatars-0.1.1-py3-none-any.whl (106.4 kB view details)

Uploaded Python 3

File details

Details for the file avatars-0.1.1.tar.gz.

File metadata

  • Download URL: avatars-0.1.1.tar.gz
  • Upload date:
  • Size: 91.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for avatars-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bdd2c5f7068bd7792757e4aa97bad874008f6dd29e350bfafb15e8684dcde9fb
MD5 50959d86571e15b5b49bbee8768e48e1
BLAKE2b-256 d096ab767ef4cee0ab42d199082e35e6cb63ab12e9b47476504dd9a19ef56da5

See more details on using hashes here.

File details

Details for the file avatars-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: avatars-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 106.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for avatars-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22a6e323d042cbe567ab3e24aecf09c4cab497a17e2b5c17ce46b7e1b8ccdc8a
MD5 b5d3f463e4dec130054fc479933e8b25
BLAKE2b-256 29182c2c7d415e61d218bd8bf1a0f957f8d090c0905b599a403e2ea36480d794

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