semvec/pypi-packages huggingface dataset:
netkit-lite 1.3.2
Simple system information collection utility
License: MIT
Requires Python: >=3.6
Keywords: system, information, utility

# NetKit Lite

A simple system information collection utility.

## Features

- Basic system information gathering (hostname and timestamp)
- Saves information to local text file

## Installation

```bash
pip install netkit-lite
```

## Usage

The package automatically collects basic system information (hostname and timestamp) when imported and saves it to a file named `netkit_lite_info.txt` in the current directory.

```python
import netkit_lite
# That's it! Check netkit_lite_info.txt for the collected information
```

## Requirements

- Python 3.6+
- No external dependencies

## License

MIT License - see LICENSE file for details.

## Contributing

Contributions welcome! Please see our GitHub repository for guidelines.

---FILE: LICENSE---
MIT License

Copyright (c) 2024 NetKit Development Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
crypt2file 1.0.0
A simple tool to encrypt/decrypt files using a machine-specific key.
License: MIT
Keywords: crypt, file, encrypt, decrypt, security

# crypt2file

**Version: 1.0.0**

A simple tool to encrypt and decrypt files. It uses a single, machine-specific key, meaning files encrypted on one computer can only be decrypted on that same computer.

## How It Works

`crypt2file` is designed for simple, machine-locked encryption. When you first use it, it generates a unique encryption key and stores it in your user home directory (`~/.crypt2file/secret.key`).

- **Machine-Specific Key**: Because the key is stored locally on your machine, any file you encrypt will only be decryptable on that machine. This is useful for storing sensitive information (like passwords or notes) in a file that is useless if copied to another computer.

- **Portability**: If you want to decrypt a file on a different computer, you must manually copy the `secret.key` file from the original machine to the same location (`~/.crypt2file/secret.key`) on the new machine.

**IMPORTANT**: The `secret.key` file is critical. If you lose this file (e.g., by reinstalling your OS), you will permanently lose the ability to decrypt any files you encrypted with it. **Please back up your `secret.key` file to a safe location.**

## Installation

```shell
pip install --upgrade .
```

## Usage

### As a Python Library

You can also use `crypt2file` in your Python code. A common use case is to load a password from a file, or create it if it doesn't exist.

```python
from crypt2file import Crypt
import getpass

crypt = Crypt()
file_path = "my_password.dat"

try:
    # Try to load the password from the file
    password = crypt.decrypt_from_file(file_path)
    print("Password loaded successfully.")
except Exception:
    # If it fails (e.g., file not found), prompt the user for a new one
    print(f"Could not load password from {file_path}. Creating a new one.")
    new_password = getpass.getpass("Enter a new password to save: ")
    crypt.encrypt_to_file(new_password, file_path)
    password = new_password
    print(f"New password saved to {file_path}.")

# Now you can use the 'password' variable in your application
print(f"The loaded/created password is: {password}")
```

### As a Command-Line Tool (CLI)

The easiest way to use `crypt2file` is from your terminal.

**Encrypt a message to a file:**

```shell
crypt2file encrypt my_secret_file.dat
```
> Enter message to encrypt: `********`
> Message encrypted and saved to my_secret_file.dat

Or provide the message directly:
```shell
crypt2file encrypt my_secret_file.dat -m "This is my secret message"
```
> Message encrypted and saved to my_secret_file.dat

**Decrypt a file:**

```shell
crypt2file decrypt my_secret_file.dat
```
> Decrypted message:
> This is my secret message

## License

This project is licensed under the MIT License.