Added MIT License

master
androiddrew 7 years ago
parent 3d8eb77807
commit 133050a219

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2017, Andrew Bednar
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -2,4 +2,4 @@
__author__ = """Drew Bednar""" __author__ = """Drew Bednar"""
__email__ = 'drew@androiddrew.com' __email__ = 'drew@androiddrew.com'
__version__ = '0.1.0' __version__ = '0.1.1'

@ -1,4 +1,4 @@
import redis from redis import StrictRedis as Client
from apistar import Component, Settings from apistar import Component, Settings
@ -19,21 +19,17 @@ class RedisBackend:
self.password = redis_config.get('PASSWORD') self.password = redis_config.get('PASSWORD')
# TODO add connection pooling # TODO add connection pooling
# TODO serialization of strings in the connector settings
class Client:
def __init__(self, backend: RedisBackend):
self.backend = backend
def get_redis_client(backend: RedisBackend): def get_redis_client(backend: RedisBackend):
""" """
Create a new redis session Create a new redis client session
""" """
client = redis.Redis(host=backend.host, client = Client(host=backend.host,
port=backend.port, port=backend.port,
password=backend.password) password=backend.password)
return client return client

@ -1,6 +1,5 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
with open('README.md') as readme_file: with open('README.md') as readme_file:
readme = readme_file.read() readme = readme_file.read()
@ -23,7 +22,7 @@ test_requirements = [
setup( setup(
name='apistar_redis', name='apistar_redis',
version='0.1.0', version='0.1.1',
description="A Redis backend Component for Apistar", description="A Redis backend Component for Apistar",
long_description=readme + '\n\n' + history, long_description=readme + '\n\n' + history,
author="Drew Bednar", author="Drew Bednar",
@ -36,7 +35,7 @@ setup(
zip_safe=False, zip_safe=False,
keywords='apistar_redis', keywords='apistar_redis',
classifiers=[ classifiers=[
'Development Status :: 2 - Pre-Alpha', 'Development Status :: 1 - Pre-Alpha',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License', 'License :: OSI Approved :: MIT License',
'Natural Language :: English', 'Natural Language :: English',
@ -47,4 +46,4 @@ setup(
test_suite='tests', test_suite='tests',
tests_require=test_requirements, tests_require=test_requirements,
setup_requires=setup_requirements, setup_requires=setup_requirements,
) )

Loading…
Cancel
Save