Skip to content

Commit

Permalink
rename package to cursusdb instead of cursusdb-py
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaetano Padula committed Jan 6, 2024
1 parent 74b7c1e commit 28a2ea7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
build
*.egg-info
*.egg-info
.idea
File renamed without changes.
3 changes: 2 additions & 1 deletion cursusdb-py/main.py → cursusdb/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import base64
import socket


# CursusDB Cluster Client Class
class Client:
def __init__(self, host, port, username, password, tls):
Expand All @@ -36,7 +37,7 @@ def connect(self):
context = ssl.create_default_context()
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
self.sock = context.wrap_socket(socket.socket(socket.AF_INET), server_hostname=self.host)

self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect((self.host, self.port))
auth_str = f"{self.username}\\0{self.password}".encode("utf8")
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Will soon be available on PyPI.

Importing package
```
from cursusdb-py import Client
from cursusdb import Client
```

Using
Expand All @@ -12,6 +12,6 @@ Using
c = Client("0.0.0.0", 7681, "username", "password", False)
print(c.connect())
print(c.query("select count from tweets;"))
print(c.query("ping;"))
c.close()
```
```
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from setuptools import setup, find_packages

setup(
name='cursusdb-py',
version='1.0',
name='cursusdb',
version='1.1.0',
description='Official CursusDB Native Client for Python',
packages=find_packages(),
install_requires=[]
)
)

0 comments on commit 28a2ea7

Please sign in to comment.