cachefly-1.0.0
توضیحات
Convenient CacheFly CDN management for Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cachefly-1.0.0 |
| نام | cachefly |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Nick Bruun |
| ایمیل نویسنده | nick@bruun.co |
| آدرس صفحه اصلی | http://bruun.co/ |
| آدرس اینترنتی | https://pypi.org/project/cachefly/ |
| مجوز | Copyright 2013 Nick Bruun <nick@bruun.co> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
cachefly -- convenient CacheFly CDN management
==============================================
The CacheFly CDN exposes an HTTP based API for forcefully purging content from their reverse proxying CDN solution. The ``cachefly`` module provides a simple interface for performing those actions.
Furthermore, the ``django_cachefly`` module provides a convient way to configure and access an application wide API client instance through your Django settings.
Installation
------------
To install ``cachefly`` and ``django_cachefly``, do yourself a favor and don't use anything other than `pip <http://www.pip-installer.org/>`_:
.. code-block:: bash
$ pip install cachefly
Installation in Django
----------------------
After the module has been installed, you need to add ``django_cachefly`` to your list of ``INSTALLED_APPS`` in your application configuration:
.. code-block:: python
INSTALLED_APPS = (
...
'django_cachefly',
)
You also need to configure your CacheFly API key in your application's settings file:
.. code-block:: python
CACHEFLY_API_KEY = '..'
The CacheFly API client can now be easily accessed from the entire application:
.. code-block:: python
from django_cachefly import client
...
Testing
-------
Testing requires a set of valid credentials. All tests are performed against URLs in the ``/_testing`` path for the CDN node your select. Credentials are loaded from the environment during testing for security:
``CACHEFLY_API_KEY``
API key to use for testing.
نحوه نصب
نصب پکیج whl cachefly-1.0.0:
pip install cachefly-1.0.0.whl
نصب پکیج tar.gz cachefly-1.0.0:
pip install cachefly-1.0.0.tar.gz