A website where you can create collections on smiles and use it on other sites
Project description
A website where you can create collections on smiles and use it on other sites.
Quick start
pip3 install smilepack
smilepack runserver
It creates database.sqlite3 in current directory. Address http://localhost:5000/.
For production you can use gunicorn (or another WSGI server):
gunicorn -w 4 ‘smilepack.application:create_app()’
Configuration
Default settings are change by .py file containing configuration class. Example in examples/settings.py. Save it as local_settings.py and load using environment variable:
export SMILEPACK_SETTINGS=local_settings.Production
You can specify any Python object.
For development you can inherit class smilepack.settings.Development, for production use smilepack.settings.Config.
Database
DATABASE_ENGINE и DATABASE are [Pony ORM connection settings](http://doc.ponyorm.com/database.html#database-providers). examples/settings.py has example for MySQL. Default database is sqlite3.
Smiles
Smiles need to be stored somewhere. Use UPLOAD_METHOD:
None (default) — don’t save. All smiles should be uploaded to some hosting in advance.
‘imgur’ — upload to Imgur. For this, set IMGUR_ID of API application. You need to install Flask-Imgur.
‘directory’ — upload to SMILES_DIRECTORY.
If upload method is set, you can disable custom urls of smiles by ALLOW_CUSTOM_URLS = True. Then all links of user will reuploaded.
SMILE_URL — template for links of smiles stored in SMILES_DIRECTORY. Default /smiles/images/{filename}; if you use another url (CDN for example), you can set another template here. ICON_URL setting is similar.
Utilites
smilepack status — partly verifies the operability of configuration and database;
smilepack shell — runs interactive console with application.
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
Built Distribution
Hashes for smilepack-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea214c926a25d94fc4ac620ff3363d96b8309bf7cdebd4307ce65ecc41dd50e |
|
MD5 | 9691267e8b35487a9865128db099bb9b |
|
BLAKE2b-256 | 1c13ba7e583461aa2ce05753f11e4412438ccfd7b344cba62bad187410d200a8 |