semvec/pypi-packages huggingface dataset:
Rnd-str 0.0.1
Random string production library.
Requires Python: >=3.6

# Example Package

[GetHub Project](https://github.com/DrSudoSaeed/)

Random string production library.

To use, install the library according to the instructions!

**Follow the steps below to use:**

```

**Default length: 5**


from Rnd_str.main import random_str

a = random_str(5)
print(a)

```
envfiles 0.1.1
Simple layered loading of env files
Requires Python: >=3.6, <4
Keywords: environment,variables,12-factor

# envfiles: Simple layered loading of env files

So you've set up your app to configure itself from environment variables,
awesome, well done!

Now all you need to do is to make sure *all of them* are present before
running your app. Good thing we have env files, right? But wait, they can't
be the same all the time, they're slightly different for tests, Docker,
and for local development... that's annoying.

No biggie though, we can just create several env files and load them...
But that would fail in prod because the env files won't be there...
We could load them only if they exist but that's kinda hacky...

Wouldn't it be neat if we could layer env files? Imagine a `base.env`:

```
CACHE_ENABLED=1
DATABASE_HOST=localhost
DATABASE_NAME=myapp
```

A `test.env` that overrides it:

```
# >> base.env
CACHE_ENABLED=0
DATABASE_NAME=myapp_test
```

Note the first line `# >> base.env`, the `# >> ` is an arbitrary prefix, the
`base.env` is a path *relative to the file being read*.

Then point envfiles to the file you want to load and let it resolve the variables.
For example, you could define *one* environment variable, `ENV_FILE` for instance,
containing a relative path to the env file you want to load:

```python
import envfiles

env_vars = envfiles.load_env_files(os.getenv("ENV_FILE"))
assert env_vars == {
    "CACHE_ENABLED": "0",
    "DATABASE_HOST": "localhost",
    "DATABASE_NAME": "myapp_test",
}
```

Note `envfiles` will **not** mess with your `os.environ`, or attempt parsing or
(de)serializing variables. The output is a dictionary of strings to strings,
what you do with it is entirely your business. Typically you would combine it
with `os.environ` and pass it to your app's configuration solution.

For example, if you're using
[`environ-config`](https://github.com/hynek/environ-config) 💚

```python
import environ
import envfiles
from settings import MyConfig  # your environ-config Config class

env_vars = envfiles.load(os.getenv("ENV_FILE"))

env_vars.update(os.environ)  # actual environment variables have preference
config = environ.to_config(MyConfig, environ=env_vars)
```

## Why?

Frustration, mostly. I've had this issue more times than I can count. I've tried
different libraries but none of them supported layering or sort of did but
messed with the `os.environ` in surprising ways.

The idea behind `envfiles` is to declaratively define how the env files are loaded
and let you use whatever configuration solution you want.

Configuration is the first thing your app does, it should be as quick and
straightforward as possible.

## Alternatives

If `envfiles` is not what you were looking for here are some other options you
may want to consider, all of them more mature and featured than `envfiles`:

- [`dotenv`](https://github.com/theskumar/python-dotenv)
- [`environs`](https://github.com/sloria/environs)
pydatanet 0.1.2rc3
A fancy networking library which supports both the protocols and makes it hard to shoot yourself in the foot.
Requires Python: >=3.8

# pydatanet, a lightweight easy-to-use yet intuitive networking library, built on top of plain-vanilla sockets.

PyDataNet does most of the tedious hard labour for you and removes the pain out of socket programming. It supports TCP and UDP (**UDP WIP**).

It features:
- Object serialization into bytes and de-serialization into the literal object through pickle so you don't have to worry about converting your objects into sendable bytes.
- An easy to understand client/server concept.
- Even a beginner can start learning it and get a small hang of how sockets work, hence, great if you don't want to directly dip your toes into sockets; but I would still recommend learning sockets as it can be crucial whilst debugging errors.

# Some boilerplate

**BASIC SERVER:**
```python
import pydatanet
from pydatanet.server import Server, ServerType

def onPacketSend(sender, data):
    print(f"{sender.getIp()} sent me this!: {data}")

myServer = Server('localhost', 5050, ServerType.TCP)
myServer.on_recv_bind(onPacketSend)
myServer.connect()
```
**BASIC CLIENT:**

```python
import pydatanet
from pydatanet.client import Client, ClientType # do not mistake for pydatanet.server.client!

def myFuncOnReceiveTCP(data_decoded):
    print(f"I got some data: {data_decoded}")

class myFancyClass():
    def __init__(self, doLikePizza: bool = False):
        self.doLikePizza = doLikePizza

c = Client(ClientType.TCP)
c.hook_tcp_recv(myFuncOnReceiveTCP)
c.connect("localhost", 5050)
c.send(
    {
        "foo": "bar",
        "math": 55,
        "myNumbers": [0, 1, 2, 3, 4, 5],
        "myClass": myFancyClass(True)
    }
)
```
and the best part, your data will reach the other side just in the same shape! Now, isn't that convenient?

# EXTRA FEATURES
- Incredibly foolproof; sockets created auto-close upon the program stopping so you don't shoot yourself in the foot. Even if THAT fails, it will auto-reuse the socket.
- You can supply the extra argument `autoPoll` to False and hook up `Client._connect` to your task managing system if you want to (if you want to control the frequency of heartbeats/polls).

# CLOSING NOTES
- Please report vulnerabilites, bugs, suggestions and performance issues in the issues tab. That would be greatly appreciated.
- This is **NOT** a full time project; this is just something I made because PyEnet was extremely imperformant and other libraries did not satisfy my needs. I will not dedicate my entire time to this.
- Check out TUO; a game I am working on, that was the drive to make this library. (https://discord.gg/2ZycjAA)
- I do not appreciate any illegal tomfoolery, better known as **felonies** to be committed using my library. I am not responsible for any damage conducted using this library.
- I swear I shall not add any protestware or malware. If you see someone adding such things, my account will have been likely hijacked. I do not like mixing politics into programming. (**cough cough**, @RIAEvangelist)