Skip to content

Commit b604349

Browse files
committed
Prepped repo for upload to pypi -- added setup.py, etc.
Includes adding MANIFEST.in, adding README.rst, deleted requirements.txt, added tests package, and modified main package name
1 parent fdc9604 commit b604349

8 files changed

Lines changed: 52 additions & 10 deletions

File tree

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md
2+
include LICENSE.txt

README.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
graphql-python-subscriptions
2+
============================
3+
4+
A port of apollographql subscriptions for python, using gevent
5+
websockets and redis
6+
7+
This is a implementation of apollographql subscriptions-transport-ws and
8+
graphql-subscriptions in Python. It currently implements a pubsub using
9+
redis.py and uses gevent for concurrency. It also makes heavy use of
10+
syrusakbary/promise python implementation to mirror the logic in the
11+
apollo-graphql libraries.
12+
13+
Meant to be used in conjunction with graphql-python / graphene server
14+
and apollo-graphql client.
15+
16+
Very initial implementation. Currently only works with Python 2. No
17+
tests yet.
File renamed without changes.

subscriptions/subscription_transport_ws.py renamed to graphql-python-subscriptions/subscription_transport_ws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def unsubscribe(self, graphql_sub_id):
4747
self.on_unsubscribe(self.ws)
4848

4949
def on_open(self):
50-
if self.ws.protocol is None or (GRAPHQL_SUBSCRIPTIONS not in self.ws.protocol):
50+
if self.ws.protocol is None or (GRAPHQL_SUBSCRIPTIONS not in
51+
self.ws.protocol):
5152
self.ws.close(1002)
5253

5354
def keep_alive_callback():

requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

setup.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from setuptools import setup, find_packages
2+
3+
4+
setup(
5+
name="graphql-python-subscriptions",
6+
version="0.1.0",
7+
author="Heath Ballard",
8+
author_email="heath.ballard@gmail.com",
9+
description=("A port of apollo-graphql subscriptions for python, using\
10+
gevent websockets, promises, and redis"),
11+
license="MIT",
12+
keywords="graphql websockets concurrent subscriptions",
13+
url="https://github.com/hballard/graphql-python-subscriptions",
14+
packages=find_packages(exclude=['tests']),
15+
long_description=open('README.rst').read(),
16+
classifiers=[
17+
"Development Status :: 3 - Alpha",
18+
'Intended Audience :: Developers',
19+
"Topic :: Software Development :: Libraries",
20+
"Environment :: Web Environment",
21+
"Programming Language :: Python :: 2",
22+
"Programming Language :: Python :: 2.7",
23+
"License :: OSI Approved :: MIT License"
24+
],
25+
install_requires=[
26+
'gevent-websocket',
27+
'redis',
28+
'Promises'
29+
],
30+
include_package_data=True
31+
)

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)