semvec/pypi-packages huggingface dataset:
pysnapshot 0.1.0a0
Take snapshots of your codebase and reload them easily later.
License: MIT
Keywords: machine learning,experimentation

# PySnapShot

This is a tiny helper package for saving code associated with
an experiment, and reloading it at a later time. There are two main functions:

1. `pysnapshot.capture`: Captures the code associated with a module into a snapshot at a given path.
2. `pysnapshot.load`: Loads the code from the snapshot into a module of a specified name. If no name is given, then the module name is whatever the folder
name is for the snapshot.

## Usage

Let's say I'm working on the code in `examples/hello_world.py`. Let's save the current version 
(working in the `examples/` directory):

```python
import pysnapshot
import hello_world

# First let's take a snapshot of the 
# hello_world package.

path = pysnapshot.capture(hello_world, '/tmp/hello_world_snap/', overwrite=True)
hello_world_snap = pysnapshot.load(path)
print(hello_world_snap.__file__)

# The snapshot is loaded from the specified directory. The code was all copied to
# and is under the snapshot:

print("From original package code", hello_world.func1())
print("From snapshot", hello_world_snap.hello_world.func1())

# You can import from the snapshot as if it were a regular package

from hello_world_snap import hello_world
print("From snapshot, overwriting the original package code", hello_world.func1())
```

This has the output:

```bash
❯ cd examples/
❯ python demo.py
/private/tmp/hello_world_snap/__init__.py
/Users/prem/research/snapshot/examples/hello_world/hello.py TEST
From original package code TEST
/private/tmp/hello_world_snap/hello_world/hello.py TEST
From snapshot TEST
/private/tmp/hello_world_snap/hello_world/hello.py TEST
From snapshot, overwriting the original package code TEST
```

And it created a Python module with this directory structure:

```
❯ tree '/tmp/hello_world_snap/'
/tmp/hello_world_snap/
├── __init__.py
└── hello_world
    ├── __init__.py
    ├── hello.py
    └── nested
        └── __init__.py
```

# Releasing

Do the following steps:

```
python setup.py sdist
```

Upload it to test PyPI:

```
pip install twine
twine upload --repository testpypi dist/*
pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U pysnapshot
```

Make sure you can install it and it works (e.g. run the examples). Now upload
to actual PyPI:

```
twine upload dist/*
```
pypi-client 0.2.3
PyPI command-line tool
License: MIT
Requires Python: >=3.8,<4
Keywords: pypi,client,cli,github,search

PyPI client
===========

![Lint](https://github.com/abahdanovich/pypi-client/workflows/Lint/badge.svg)
![Test](https://github.com/abahdanovich/pypi-client/workflows/Test/badge.svg)

CLI tool for searching for a python package by name.

* fetches all package names from PyPi
* filters and finds matching packages (by name)
* downloads github stars (if package uses GH as a repo) number and package downloads
* shows results in a table or json

Install
-------

```
pip install pypi-client
```

Usage
-----

```
Usage: pypi-client [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  auth-github  Log into GitHub
  search       Search python package by name
```

Search
------

```
Usage: pypi-client search [OPTIONS] NAME_SEARCH

  Search python package by name

Options:
  --limit INTEGER RANGE           Max number of items to return
  --no-cache                      Clear cache before run
  --log-level [ERROR|WARN|INFO|DEBUG]
                                  Logging level
  --json                          Return in json format
  --threads INTEGER               Number of threads to use
  --help                          Show this message and exit.
```

Example output:

```
$ pypi-client search kafka
Found 155 packages:
name                                 downloads  summary                                                version      home_page                                                stars    releases  last_release_date
---------------------------------  -----------  -----------------------------------------------------  -----------  -----------------------------------------------------  -------  ----------  -------------------
kafka-python                           6863094  Pure Python client for Apache Kafka                    2.0.2        https://github.com/dpkp/kafka-python                      4084          34  2020-09-30
confluent-kafka                        3341286  Confluent's Python client for Apache Kafka             1.5.0        https://github.com/confluentinc/confluent-kafka-py...     2017          20  2020-08-07
ns-kafka-python                           5739  Pure Python client for Apache Kafka                    1.4.7        https://github.com/dpkp/kafka-python                      4084           1  2020-09-28
tencentcloud-sdk-python-ckafka           11820  Tencent Cloud Ckafka SDK for Python                    3.0.290      https://github.com/TencentCloud/tencentcloud-sdk-p...      297          40  2020-11-12
kafka                                   939197  Pure Python client for Apache Kafka                    1.3.5        https://github.com/dpkp/kafka-python                      4084          17  2017-10-07
[...]
```