diff --git a/README.md b/README.md index 7f1ec2e3..f327978d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ +Edited to allow limited support for Python 2.7. + Python 3.6 module providing all current Meraki [Dashboard API](https://dashboard.meraki.com/api_docs) calls to interface with the Cisco Meraki cloud-managed IT solutions. Also available via [PIP](https://pypi.python.org/pypi/meraki/). +Install via pip install https://github.com/batmunkey/dashboard-api-python/zipball/master + ## Initial Setup * Enable APIs in your Meraki dashboard and obtain an APIKey: [Instructions](https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API) @@ -10,6 +14,7 @@ Also available via [PIP](https://pypi.python.org/pypi/meraki/). * Use pip (or alternative such as easy_install) to install required packages: * pip install requests * pip install meraki + * pip install ipaddress * You are now ready to create your first script: * create a new file and name it with python extension, e.g., meraki_hello_world.py * import the meraki api into your script, e.g., from meraki import meraki diff --git a/meraki/__init__.py b/meraki/__init__.py new file mode 100644 index 00000000..10cf75e0 --- /dev/null +++ b/meraki/__init__.py @@ -0,0 +1 @@ +### Placeholder diff --git a/meraki.py b/meraki/meraki.py similarity index 99% rename from meraki.py rename to meraki/meraki.py index 0c7a84e7..faff172e 100644 --- a/meraki.py +++ b/meraki/meraki.py @@ -21,7 +21,7 @@ import warnings -base_url = 'https://api.meraki.com/api/v0' +base_url = 'https://dashboard.meraki.com/api/v0/' tzlist = ['Africa/Abidjan', 'Africa/Accra', @@ -3266,8 +3266,8 @@ def updatessid(apikey, networkid, ssidnum, name, enabled, authmode, encryptionmo # Update the attributes of an SSID # https://api.meraki.com/api_docs#update-the-attributes-of-an-ssid +""" def updatessidobject(apikey, networkid, newssid: SSID, suppressprint=False): - ''' Args: apikey: User's Meraki API Key @@ -3278,7 +3278,6 @@ def updatessidobject(apikey, networkid, newssid: SSID, suppressprint=False): Returns: result: Error message or details of newly created SSID - ''' # puturl = '{0}/networks/{1}/ssids/{2}'.format(str(base_url), str(networkid), newelement.ssidnum) headers = { 'x-cisco-meraki-api-key': format(str(apikey)), @@ -3297,7 +3296,7 @@ def updatessidobject(apikey, networkid, newssid: SSID, suppressprint=False): # result = __returnhandler(dashboard.status_code, dashboard.text, str(newssid.type).upper(), suppressprint) return result - +""" ### STATIC ROUTES ### diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b88034e4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..bc34a142 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from distutils.core import setup +setup( + name = 'meraki', + packages = ['meraki'], + version = '0.29', + description = 'Cisco Meraki Dashboard API Python 3.6 Module', + author = 'Shiyue Cheng', + author_email = 'shiychen@cisco.com', + url = 'https://github.com/batmunkey/dashboard-api-python', + download_url = 'https://github.com/batmunkey/dashboard-api-python/', + keywords = ['meraki', 'dashboard', 'cisco'], + classifiers = [], +)