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/bottts_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/bottts_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/female_1.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_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/identicon_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/initials_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/initials_2.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/male_1.svg?sanitize=true https://github.com/007gzs/avatars/raw/master/resource/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


Release history Release notifications

This version

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for avatars, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size avatars-0.1.0-py3-none-any.whl (80.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size avatars-0.1.0.tar.gz (66.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page