Skip to main content

The easiest way to manage, compress, and upload Lottie assets to a CDN.

Project description

Lottie Animation Manager :rocket:

The easiest way to manage, compress, and upload Lottie assets to a CDN

alt text

Philosophy

Lottie Animation Manager was created to provide a new way of hosting and managing Lottie Animation Assets. Instead of including all lottie animations inside of the static folder in an application, we think all animation assets should be hosted on a CDN (content delivery network).

This way, updates to animation assets don't require changes to the code repository or static asset folder. This also reduces the overall build size of an application, reducing the website load time for every user session.

Lottie Animation Manager is the first half of a larger plan. Soon, there will be a companion Vue library as well which will let you easily reference your lottie assets hosted on a CDN from inside of your Vue Application.

Features

  • Upload your lottie animation assets to AWS S3 + Cloudfront CDN with a single command
  • Automatically compress image assets using TinyPNG to save load time before they are uploaded

Setup/Installation

Simply install the Lottie Animation Manager library through pip:

# most common way:
pip install lottie-animation-manager
# for people who have multiple versions of python:
pip3 install lottie-animation-manager

Usage

  1. Install the AWS CLI
pip3 install awscli --upgrade --user
  1. Configure / Add your AWS Security Access Keys by entering:
aws configure
  1. Now, using cd , navigate to your folder with your lottie asset (which was exported by the Bodymovin plugin). Your folder layout might look something like this: alt text
  2. Call the python application from your command line like so from inside this animation directory:
lottie-animation-manager
  1. Once the application loads, follow the steps in the lottie animation wizard to upload, compress, and manage your assets to Cloudfront CDN :tada:

AWS Cloudfront CDN Setup (Background)

Create an AWS Cloudfront deployment so that your lottie applications can load quickly worldwide whenever they are called within your application. Basic instructions to do this:

  1. Create your AWS security keys by visiting Your account Name > My Security Credentials at the top, clicking Access Keys, and clicking Create New Access Key . Write down of these securities as you can only see them one time.
  2. Create a basic s3 bucket: alt text image above is incorrect, disable block all public access
  3. Uploaded an image asset and set it to read permission everyone alt text
  4. Visit AWS Cloudfront home alt text
  5. Click Create Distribution
  6. Click Get Started under Web alt text
  7. Enter an origin domain name where you are choosing your s3 bucket. Keep all other default settings the same: alt text Click Create Distribution
  8. Let cloudfront create your deployment, this takes a few minutes to complete.
  9. Eventually you will see the status change to Deployed and state change to Enabled: alt text Note the domain name URL which cloudfront "creates" for your new deployment (ending in ****.cloudfront.net), you'll need this in the next step.
  10. Visit your image asset with the new cloudfront endpoint URL to test to make sure your cloudfront CDN deployment is working. alt text

AWS Cost Warning

Please be careful using AWS services. This includes costs you might accumulate for uploading files to services such as AWS S3.

The Author/copyright holders of this package are not liable for any costs you might incur for cloud hosting or any other fees while using Lottie Animation Manager.

MIT License

Copyright (c) 2020 BAKHTAWAR AWAN

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

lottie-animation-manager-0.0.5.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lottie_animation_manager-0.0.5-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file lottie-animation-manager-0.0.5.tar.gz.

File metadata

  • Download URL: lottie-animation-manager-0.0.5.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for lottie-animation-manager-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d6ba0ee9b1df1e80b3c4360d9679bdfd6f13d99528f2357646f7374768ddf73d
MD5 63ea3a99ccbc34db186746edacf00ad3
BLAKE2b-256 0d4d2f0ae4914116b5659d0bf3d954e0d9f5c664997c9943656aba82bb03412d

See more details on using hashes here.

File details

Details for the file lottie_animation_manager-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: lottie_animation_manager-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for lottie_animation_manager-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ae73244173ea0b53bf7b35190171a83e4ff021ebe5abdbae81102ed13d85a8ae
MD5 f67785b66ddedf99a928c7a9340dce0f
BLAKE2b-256 0ffd47d71e8e4384f83704b58d2ed8c0ecc6a9886525ba360a7bb3267a353a3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page