Renaming to Pillar SDK.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
The Attract Python SDK is released under the BSD License:
|
||||
The Pillar Python SDK is released under the BSD License:
|
||||
|
||||
Copyright (c) 2015, Blender Foundation
|
||||
Copyright (c) 2013-2014, PayPal
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Attract Python REST SDK
|
||||
Integrate this module in your Python app to communicate with an Attract server.
|
||||
# Pillar Python REST SDK
|
||||
Integrate this module in your Python app to communicate with an Pillar server.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
__version__ = "0.0.1"
|
||||
__pypi_username__ = "fsiddi"
|
||||
__pypi_packagename__ = "attract-sdk"
|
||||
__github_username__ = "fsiddi"
|
||||
__github_reponame__ = "Attract-Python-SDK"
|
||||
@@ -15,7 +15,7 @@ class Api(object):
|
||||
# User-Agent for HTTP request
|
||||
library_details = "requests {0}; python {1}".format(
|
||||
requests.__version__, platform.python_version())
|
||||
user_agent = "Attract-Python-SDK/{0} ({1})".format(
|
||||
user_agent = "Pillar-Python-SDK/{0} ({1})".format(
|
||||
__version__, library_details)
|
||||
_api_singleton = None
|
||||
def __init__(self, options=None, **kwargs):
|
||||
@@ -23,7 +23,7 @@ class Api(object):
|
||||
|
||||
Usage::
|
||||
|
||||
>>> from attractsdk import Api
|
||||
>>> from pillarsdk import Api
|
||||
>>> Api.Default(
|
||||
endpoint="http://localhost:5000",
|
||||
username='USERNAME',
|
||||
@@ -94,8 +94,8 @@ class Api(object):
|
||||
|
||||
http_headers = utils.merge_dict(self.headers(), headers or {})
|
||||
|
||||
if http_headers.get('Attract-Request-Id'):
|
||||
logging.info("Attract-Request-Id: {0}".format(http_headers['Attract-Request-Id']))
|
||||
if http_headers.get('Pillar-Request-Id'):
|
||||
logging.info("Pillar-Request-Id: {0}".format(http_headers['Pillar-Request-Id']))
|
||||
try:
|
||||
# Support for Multipart-Encoded file upload
|
||||
if files and method in ['POST', 'PUT', 'PATCH']:
|
||||
5
pillarsdk/config.py
Normal file
5
pillarsdk/config.py
Normal file
@@ -0,0 +1,5 @@
|
||||
__version__ = "0.0.1"
|
||||
__pypi_username__ = "armadillica"
|
||||
__pypi_packagename__ = "pillar-sdk"
|
||||
__github_username__ = "armadillica"
|
||||
__github_reponame__ = "Pillar-Python-SDK"
|
||||
@@ -31,7 +31,7 @@ class Resource(object):
|
||||
"""Generate HTTP header
|
||||
"""
|
||||
return utils.merge_dict(self.header, self.headers,
|
||||
{'Attract-Request-Id': self.generate_request_id()})
|
||||
{'Pillar-Request-Id': self.generate_request_id()})
|
||||
|
||||
def __str__(self):
|
||||
return self.__data__.__str__()
|
||||
@@ -12,8 +12,8 @@ def join_url(url, *paths):
|
||||
|
||||
Usage::
|
||||
|
||||
>>> utils.join_url("attract:5000", "shots")
|
||||
attract:5000/shots
|
||||
>>> utils.join_url("pillar:5000", "shots")
|
||||
pillar:5000/shots
|
||||
"""
|
||||
for path in paths:
|
||||
url = re.sub(r'/?$', re.sub(r'^/?', '/', path), url)
|
||||
@@ -25,8 +25,8 @@ def join_url_params(url, params):
|
||||
|
||||
Usage::
|
||||
|
||||
>>> utils.join_url_params("attract:5000/shots", {"page-id": 2, "NodeType": "Shot Group"})
|
||||
attract:5000/shots?page-id=2&NodeType=Shot+Group
|
||||
>>> utils.join_url_params("pillar:5000/shots", {"page-id": 2, "NodeType": "Shot Group"})
|
||||
pillar:5000/shots?page-id=2&NodeType=Shot+Group
|
||||
"""
|
||||
return url + "?" + urlencode(params)
|
||||
|
||||
10
setup.py
10
setup.py
@@ -2,11 +2,11 @@
|
||||
from distutils.core import setup
|
||||
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'attractsdk'))
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pillarsdk'))
|
||||
from config import __version__, __pypi_packagename__, __github_username__, __github_reponame__
|
||||
|
||||
long_description="""
|
||||
The Attract REST SDK provides Python APIs to communicate to the Attract webservices.
|
||||
The Pillar REST SDK provides Python APIs to communicate to the Pillar webservices.
|
||||
"""
|
||||
|
||||
# license='Free BSD'
|
||||
@@ -20,11 +20,11 @@ setup(
|
||||
version= __version__,
|
||||
author='Francesco Siddi, PayPal',
|
||||
author_email='francesco@blender.org',
|
||||
packages=['attractsdk'],
|
||||
packages=['pillarsdk'],
|
||||
scripts=[],
|
||||
url=url,
|
||||
license='BSD License',
|
||||
description='The Attract REST SDK provides Python APIs to communicate to the Attract webservices.',
|
||||
description='The Pillar REST SDK provides Python APIs to communicate to the Pillar webservices.',
|
||||
long_description=long_description,
|
||||
install_requires=['requests>=1.0.0', 'six>=1.0.0', 'pyopenssl>=0.14'],
|
||||
classifiers=[
|
||||
@@ -36,5 +36,5 @@ setup(
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||
],
|
||||
keywords=['attract', 'rest', 'sdk', 'tracking', 'film', 'production']
|
||||
keywords=['pillar', 'rest', 'sdk', 'tracking', 'film', 'production']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user