Skip to main content

sparrow_tool

image image image image


Install

pip install sparrow-tool
# Or dev version
pip install sparrow-tool[dev]
# Or
pip install -e .
# Or
pip install -e .[dev]

Usage

Safe logger in multiprocessing

from sparrow.log import Logger
import numpy as np
logger = Logger(name='train-log', log_dir='./logs', )
logger.info("hello","numpy:",np.arange(10))

logger2 = Logger.get_logger('train-log')
print(id(logger2) == id(logger))
>>> True

Multiprocessing SyncManager

Open server first:

$ spr start-server

The defualt port 50001.

(Process1) productor:

from sparrow.multiprocess.client import Client
client = Client(port=50001)
client.update_dict({'a': 1, 'b': 2})

(Process2) consumer:

from sparrow.multiprocess.client import Client
client = Client(port=50001)
print(client.get_dict_data())

>>> {'a': 1, 'b': 2}

Common tools

  • Kill process by port

    $ spr kill {port}
    
  • pack & unpack
    support archive format: "zip", "tar", "gztar", "bztar", or "xztar".

    $ spr pack pack_dir
    
    $ spr unpack filename extract_dir
    

Milvus

  • start
    $ spr milvus start
    
  • stop
    $ spr milvus stop
    
  • remove database
    $ spr milvus rm
    

Metadata

Release files for sparrow-tool 0.8.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparrow-tool 0.8.7
File Size Uploaded Provenance Actions
sparrow_tool-0.8.7.tar.gz 4.7 MB Without provenance Details for sparrow_tool-0.8.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sparrow-tool 0.8.7
File Interpreter ABI Platform Actions
sparrow_tool-0.8.7-py2.py3-none-any.whl Python 3, Python 2 none any Details for sparrow_tool-0.8.7-py2.py3-none-any.whl

Total release size: 9.5 MB

Release files / sparrow_tool-0.8.7.tar.gz

Download URL sparrow_tool-0.8.7.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
ea2e4e86402babdce1015bd45406d2129311427bdf9f206351d4ca951c41f8ee
BLAKE2b-256 checksum
How to use checksums
fc60a045d5678cfd9259297faf80b2aa05499616cda571173356884ca894c112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / sparrow_tool-0.8.7-py2.py3-none-any.whl

Download URL sparrow_tool-0.8.7-py2.py3-none-any.whl
Size 4.8 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5eacf5f7920e2004c3dd0fcffd2f76eb8d74b0bbbaadb3c280888e1dd323a37e
BLAKE2b-256 checksum
How to use checksums
c2cd8c71ee10efc97b2f61d98de69717a1fe2fedddee8ea537a880def88423ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Security for sparrow-tool 0.8.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page