GithubHelp home page GithubHelp logo

lavatar's Introduction

Lavatar

Lavatar is an LDAP-backend avatar server with Gravatar like URL support.

Lavatar fetches all email addresses from an LDAP server with a given search filter and stores them with their md5hash on Redis. Per defualt Lavatar also use Redis to cache the avatar images.

For now lavatar only support image requests.

Quick start

You can use the docker container image and the docker-compose example to test this app:

wget https://raw.githubusercontent.com/rroemhild/lavatar/master/docker-compose.yml
docker-compose up

and test in browser: http://localhost:5000/avatar/982391f62e589420d9fdb56a62c5e16c

Install

git clone https://github.com/rroemhild/lavatar.git
cd lavatar
pip install -r requirements.txt gevent
cp lavatar/default_settings.py settings.py

Configure lavatar in settings.py and run python production.py example.

Image Request

The default image size for the base request is 80x80, max size limit is 1024x1024.

http://localhost:5000/avatar/HASH

Set s or size to scale the avatar image

http://localhost:5000/avatar/HASH?s=160

Set d or default for the default image available in static/img.

http://localhost:5000/avatar/HASH?d=keyword

Set m or method to resize Image with the specified method: 'crop', 'cover', 'contain', 'width', 'height' or 'thumbnail'. Default is thumbnail

http://localhost:5000/avatar/HASH?s=120&m=cover

Set w or width to resize width and h or height to resize height.

http://localhost:5000/avatar/HASH?h=120&m=height

lavatar's People

Contributors

rroemhild avatar sengels avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.