🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pygalaxy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygalaxy

common package

0.4.2
PyPI
Maintainers
1

PyGalaxy

This is a simple common package.

Github: https://github.com/patrickxu1986/pygalaxy

Dependence

pip3 install -r requirements.txt

Use

  • logger
from pygalaxy import logger

logger.debug('log message') 
logger.info('log message') 
  • time
from pygalaxy import time_master

time_master.get_current_date_str()
time_master.get_current_unix_time()
  • ConsistentHash
from pygalaxy.consistent_hash import Node, ConsistentHash

node = Node(node_name='192.1.1.4')
consistent_hash = ConsistentHash()
consistent_hash.add_node(node)
n = consistent_hash.get_node('test content')

  • AES encrypt&decrypt
from pygalaxy.aes_master import AesMaster

encrypt = AesMaster.encrypt('test content', key='this is a key')
print(encrypt)
decrypt = AesMaster.decrypt(encrypt, key='this is a key')
print(decrypt)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts