Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restructure for PYPI #2

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions connection.py → realtime_py/connection.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import json
import websockets
from channel import Channel
from realtime_py.channel import Channel
from collections import defaultdict
import asyncio
from messages import Message, ChannelEvents, PHOENIX_CHANNEL, HEARTBEAT_PAYLOAD
from Exceptions import NotConnectedError
from realtime_py.message import Message, ChannelEvents, PHOENIX_CHANNEL, HEARTBEAT_PAYLOAD
from realtime_py.exceptions import NotConnectedError

class Socket:

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
47 changes: 47 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python

"""The setup script."""

from setuptools import setup, find_packages

with open('README.md') as readme_file:
readme = readme_file.read()

history = ""

requirements = ['websockets==8.1']

setup_requirements = [ ]

test_requirements = [ ]

setup(
author="Lionell Loh",
author_email='[email protected]',
python_requires='>=3.5',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
description="Python Client for Phoenix Channels",
install_requires=requirements,
license="MIT license",
long_description=readme + '\n\n' + history,
include_package_data=True,
keywords='realtime-py',
name='realtime-py',
packages=find_packages(include=['realtime', 'realtime_py.*', 'phoenix channels', 'phoenix', 'channels', 'websocket']),
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/lionellloh/realtime-py',
version='0.1.0',
zip_safe=False,
)
6 changes: 2 additions & 4 deletions usage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from connection import Socket
from realtime_py.connection import Socket

def callback1(payload):
print("Callback 1: ", payload)
Expand All @@ -16,6 +16,4 @@ def callback2(payload):
channel_2 = s.set_channel("realtime:public:users")
channel_2.join().on("*", callback2)

if __name__ == "__main__":

s.listen()
s.listen()