semvec/pypi-packages huggingface dataset:
zoosync 3.0.2
Zookeeper service discovery
License: MIT
Keywords: service-discovery zookeeper cloud

Zoosync
=======

Zoosync is a simple service discovery tool using Zookeeper as database backend.

Usage
=====

See `zoosync --help` for brief usage or manual page for more detailed usage.

The output is in the form of shell variable assignement. Tool could be used this way::

 ZOO='zoo1.example.com,zoo2.example.com,zoo3.example.com'
 REQ_SERVICES='impala,hadoop-hdfs,test,test2,test3'

 zoosync --zookeeper ${ZOO} --services ${REQ_SERVICES} cleanup
 eval `zoosync --zookeeper ${ZOO} --services ${REQ_SERVICES} --wait 1800 wait`

 echo "active: ${SERVICES}"
 echo "missing: ${MISSING}"

Deployment
==========

::

  # install
  pip install zoosync

  # configure (/etc/zoosynrc and startup scripts)
  zoosync -z zoo1,zoo2,zoo3 -s service1,service2 -u user -p password deploy

Tests
=====

Tests require running zookeeper and proper configuration of zoosync (see Usage).

Launch::

   python setup.py test
Flask-Upstatic 0.0.6
Opinionated library for working with CDNs in Flask.
License: MIT

==============
Flask-Upstatic
==============

Opinionated library for working with CDNs in Flask.


-------------
Configuration
-------------

================================= ===============================================
``UPSTATIC_DEBUG_USE_LOCAL``      Whether to use local version when in debug mode
``UPSTATIC_S3_ACCESS_KEY_ID``     S3 Access Key ID
``UPSTATIC_S3_SECRET_ACCESS_KEY`` S3 Secret Access Key
``UPSTATIC_S3_BUCKET_NAME``       S3 Bucket Name
``UPSTATIC_S3_KEY_PREFIX``        S3 Key Prefix
``UPSTATIC_S3_CDN_HOST``          S3 CDN Host
================================= ===============================================

-----
Usage
-----

Initialize extension::

  upstatic = Upstatic(app)
  # or
  upstatic = Upstatic()
  upstatic.init_app(app)

Add a static root::

  upstatic.add_root('home', '/abs/path/static')
  upstatic.add_root('home', 'rel/path/static')

Override ``url_for``::

  app.add_template_global(upstatic.url_for)

Set a ``root`` param in ``url_for`` to get static file from named root::

  <img src="{{ url_for('static', filename='/images/image.png', root='home') }}">

You can also add static roots from packages::

  upstatic.add_root('home', 'static', package_name='home')

Add a ``root_url`` to override url building for multiple apps scenarios::

  upstatic.add_root('admin', 'static', package_name='admin',
                    root_url='http://localhost:5000/admin/static')

Compile and upload the static files::

  upstatic.upload_all('home', 'admin', protocol='http')