# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['bunnyhop']

package_data = \
{'': ['*']}

install_requires = \
['envs>=1.3,<2.0', 'requests>=2.23.0,<3.0.0', 'valley>=1.5.5,<2.0.0']

setup_kwargs = {
    'name': 'bunnyhop',
    'version': '0.1.1',
    'description': 'A Python library created make building with BunnyCDN easier',
    'long_description': '# bunnyhop\nPython library for BunnyCDN\n\n## Status\nDocumentation only phase\n\n## Install\n\n```shell script\npip install bunnyhop\n```\n\n## Getting Started \n\n```python\nfrom bunnyhop import Bunny\n\nb = Bunny(\'<api_key>\')\n```\n## Pull Zones\n\n#### Get a Pull Zone\n\n```python\nzone = b.Zone.get(id=\'myzone\')\n#Returns: <Zone: myzone > \n```\n\n#### Create a Pull Zone\n```python\nb.Zone.create(\n    Name=\'myzone\',\n    Type=0, # 0 = Standard and 1 = High Volume\n    OriginUrl=\'https://example.org\',\n    StorageZoneId=\'storage-zone-id\'\n)\n```\n\n#### List Pull Zones\n```python\nb.Zone.list()\n```\n\n#### Update a Pull Zone\n```python\nb.Zone.update(\n    id=\'zone-id\', #Positional Argument\n    OriginUrl=\'http://example.org\',\n    AllowedReferrers=[\'app.example.org\', \'www.example.org\'],\n    BlockedIps=[\'122.33.22.11\'],\n    EnableCacheSlice=False,\n    EnableGeoZoneUS=True,\n    EnableGeoZoneEU=True,\n    EnableGeoZoneASIA=True,\n    EnableGeoZoneSA=True,\n    EnableGeoZoneAF=True,\n    ZoneSecurityEnabled=True,\n    ZoneSecurityIncludeHashRemoteIP=True,\n    IgnoreQueryStrings=True,\n    MonthlyBandwidthLimit=1073741824,\n    AccessControlOriginHeaderExtensions=[\'jpg\', \'png\'],\n    EnableAccessControlOriginHeader=True,\n    BlockRootPathAccess=True,\n    EnableWebpVary=True,\n    EnableLogging=True,\n    DisableCookies=False,\n    BudgetRedirectedCountries=[\'RU\', \'BR\'],\n    BlockedCountries=[\'RU\', \'BR\'],\n    EnableOriginShield=True,\n    OriginShieldZoneCode=\'FR\',\n    AddCanonicalHeader=0,\n    CacheControlMaxAgeOverride=-1,\n    AddHostHeader=True,\n    AWSSigningEnabled=True,\n    AWSSigningKey=\'AK_EXAMPLEKEY\',\n    AWSSigningRegionName=\'us-east-1\',\n    AWSSigningSecret=\'SK_EXAMPLESECRETKET\',\n    EnableTLS1=True,\n    EnableTLS1_1=True\n    \n)\n# From Zone object\nzone.update(\n    OriginUrl=\'http://example.org\',\n    AllowedReferrers=[\'app.example.org\', \'www.example.org\'],\n    BlockedIps=[\'122.33.22.11\'],\n    EnableCacheSlice=False,\n    EnableGeoZoneUS=True,\n    EnableGeoZoneEU=True,\n    EnableGeoZoneASIA=True,\n    EnableGeoZoneSA=True,\n    EnableGeoZoneAF=True,\n    ZoneSecurityEnabled=True,\n    ZoneSecurityIncludeHashRemoteIP=True,\n    IgnoreQueryStrings=True,\n    MonthlyBandwidthLimit=1073741824,\n    AccessControlOriginHeaderExtensions=[\'jpg\', \'png\'],\n    EnableAccessControlOriginHeader=True,\n    BlockRootPathAccess=True,\n    EnableWebpVary=True,\n    EnableLogging=True,\n    DisableCookies=False,\n    BudgetRedirectedCountries=[\'RU\', \'BR\'],\n    BlockedCountries=[\'RU\', \'BR\'],\n    EnableOriginShield=True,\n    OriginShieldZoneCode=\'FR\',\n    AddCanonicalHeader=0,\n    CacheControlMaxAgeOverride=-1,\n    AddHostHeader=True,\n    AWSSigningEnabled=True,\n    AWSSigningKey=\'AK_EXAMPLEKEY\',\n    AWSSigningRegionName=\'us-east-1\',\n    AWSSigningSecret=\'SK_EXAMPLESECRETKET\',\n    EnableTLS1=True,\n    EnableTLS1_1=True \n)\n```\n\n#### Delete Pull Zone\n```python\n#From top-level\nb.Zone.delete(id=\'myzone\')\n\n#From Zone object\nzone.delete()\n```\n\n#### Purge File From Pull Zone\n```python\n# From top-level\nb.Purge.create(url=\'https://myzone.b-cdn.net/css/style.css\')\n\n# From Zone Object\nzone.purge_file(\'css/style.css\')\n```\n\n#### Purge Esntire Pull Zone\n```python\n# From top-level\nb.Zone.purge(\n    id=\'myzone\'\n)\n# From Zone object\nzone.purge()\n```\n\n#### Add Edge Rule to Pull Zone\n```python\nb.Zone.create_edge_rule(\n    id=\'myzone\',\n    Guid="6a2e94df-8aa9-4cd2-b89d-16752102ef9f", # GUID of the edge rule\n    ActionParameter1 = "My-Header",\n    ActionParameter2 = "HeaderValue",\n    Enabled = True,\n    Description = "My header value",\n    ActionType = 0, # 0 = ForceSSL, 1 = Redirect, 2 = OriginUrl, 3 = OverrideCacheTime, 4 = BlockRequest, 5 = SetResponseHeader, 6 = SetRequestHeader, 7 = ForceDownload, 8 = DisableTokenAuthentication, 9 = EnableTokenAuthentication\n    TriggerMatchingType = 1    \n    Triggers = []\n)\n```\n## Storage\n\n### Storage Zones\n\n#### Create Storage Zone\n```python\n\n# Create a Storage Zone (available regions are listed below)\nb.Storage.create(name=\'example-a\', main_storage_region=\'NY\', replica_regions=[\'DE\', \'SG\', \'SYD\'])\n# Returns: <StorageZone: example-a (id: 1234)>\n```\n\n##### Storage Regions\n\n- DE - Europe (Falkenstein)\n- NY - North America (New York)\n- SG - Asia (Singapore)\n- SYD - Oceania (Sydney)\n\n#### List Storage Zones\n```python\nb.Storage.all()\n# Returns: [<StorageZone: example-a (id: 1234)>, <StorageZone: example-b (id: 12345)>]\n```\n\n#### Delete a Storage Zone\n```python\nb.Storage.delete(1234)\n# Returns: None\n```\n\n#### Get a Storage Zone\n```python\nzone = b.Storage.get(1234)\n# Returns: <StorageZone: example-a (id: 1234)>\n```\n\n### Storage Files\n\n```python\n# Get a Storage Zone\nzone = b.StorageZone.get(1234)\n# Returns: <StorageZone: example-a (id: 1234)>\n\n# Lists files in the zone\nobj_list = zone.all()\n# Returns [<StorageFile: index.html>, <StorageFile: base.css>]\n\n# Get a file\nobj = zone.get(\'index.html\')\n#Returns <StorageFile: index.html>\n\n# Download that File\nobj.download()\n\n# Delete a file\nzone.delete(\'index.html\')\n\n# Upload a File\nzone.upload_file(dest_path=\'folder/path/error.html\', local_path=\'/home/mj/work/error.html\')\n# Returns: <StorageFile: error.html>\n\n# Create a file from a string\nzone.create_file(\'base.css\', "body {background-color: powderblue;}")\n# Returns: <StorageFile: base.css>\n```\n\n### Storage JSON Files\n\n```python\n\n# Create a json file\nmj = zone.create_json(\'23.json\', {\'first_name\':\'Michael\', \'last_name\': \'Jordan\'})\n# Returns <StorageJSONFile: 23.json>\n\n# Get information from file\nmj[\'first_name\']\n# Returns: \'Michael\'\n```\n\n# Purge\n\n## Create a Purge\n```python\n# Purge a zone or file\nb.Purge.create(url=\'https://myzone.b-cdn.net/style.css\')\n```\n\n# Stats\n\n```python\nb.Stats.get(dateFrom=\'2018-12-01\', dateTo=\'2020-01-01\', pullZone=\'example-zone\', serverZoneId=\'serverZoneID\')\n```\n# Billing\n\n#### Get Billing Summary\n```python\nb.Billing.get()\n```\n\n#### ApplyCode\n\n```python\nb.Billing.applycode(couponCode=\'somecode123\')\n```\n',
    'author': 'Brian Jinwright',
    'author_email': None,
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/capless/bunnyhop',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
