ostis-ai / py-sc-client Goto Github PK
View Code? Open in Web Editor NEWPython implementation of client for communication with Websocket sc-server.
License: MIT License
Python implementation of client for communication with Websocket sc-server.
License: MIT License
Describe the bug
In sc_client.constants.sc_types
there are integer constants that are not supposed to be imported. (e.g. SC_TYPE_NODE
, SC_TYPE_LINK
, etc.)
Proposal
Mark this constants as private to avoid common user from occasionally importing them.
Typing error
Where: sc_client.models.py
- ScLinkContent
Type of content_type
in ScLinkContent
is ScLinkContentType
(not int
), so why it's comparing by value in type_to_str()
?
class ScLinkContentType(Enum):
INT = 0
FLOAT = 1
STRING = 2
BINARY = 3
@dataclass
class ScLinkContent:
data: str | int
content_type: ScLinkContentType
addr: ScAddr = None
def __post_init__(self):
if len(str(self.data)) > LINK_CONTENT_MAX_SIZE:
raise LinkContentOversizeError
def type_to_str(self):
if self.content_type == ScLinkContentType.BINARY.value:
return common.BINARY
if self.content_type == ScLinkContentType.INT.value:
return common.INT
if self.content_type == ScLinkContentType.FLOAT.value:
return common.FLOAT
return common.STRING
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.