Skip to main content

common package

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygalaxy-0.4.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygalaxy-0.4.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file pygalaxy-0.4.2.tar.gz.

File metadata

  • Download URL: pygalaxy-0.4.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.13

File hashes

Hashes for pygalaxy-0.4.2.tar.gz
Algorithm Hash digest
SHA256 cf55f09547d91b7e6d89262ca16f4e50fe9c7257349ef30a60d6f03a3f79745a
MD5 52b0c60b5fe8097701bec5e08a99c83f
BLAKE2b-256 6d283bdc5fb77da94de376238a41af43174a5aa405dd1ce010547439902a3905

See more details on using hashes here.

File details

Details for the file pygalaxy-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: pygalaxy-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.13

File hashes

Hashes for pygalaxy-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6c94095c9565a6628f86ccf4d0cfe9e433fff057c7e2020926d557b7ec887c1b
MD5 d50abfbc3c6bb4b7fd7388047a807579
BLAKE2b-256 33975a9b5a29f3de2fbc8fa733202e9f437f4610ade97d94f52ef71755c656da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page