semvec/pypi-packages huggingface dataset:
EGAM 1.0.1
A simple API wrapper for Discord Guild Add Member
Requires Python: >=3.6
Keywords: discord,add member

# Discord-Easy-Guild-Add-Member
A simple API wrapper for Discord Guild Add Member  
For Member-Boost Bot, Member-Backup Bot ( Yes, it's same as RestoreCord )  
### >> ```pip install EGAM``` <<
### 日本語はこちら -> [README-JA](https://github.com/taka-4602/Discord-Easy-Guild-Add-Member/blob/main/README-JA.md)
## Try using it ! ( It's too simple, But it's does any good jobs ! )
#### use.py
```python
from EGAM import EGAM

token="Discord Bot Token"
cid="Client ID"
cse="Client Secret"
ruri="Redirect URI"

egam=EGAM(bot_token=token,client_id=cid,client_secret=cse,redirect_uri=ruri,proxy=None)#you can set any proxy (proxy=dict)

print(egam.get_token("code"))#get any tokens
print(egam.get_user("access_token"))#get user infomation (like user id / user name)
print(egam.add_role(user_id="1234567890",guild_id="1234567890",role_id="1234567890"))#add role to user
print(egam.add_member(access_token="access_token",user_id="1234567890",guild_id="1234567890"))#add user to guild
print(egam.refresh("refresh_token"))#refresh OAuth2 AccessToken
```
I wrote how to use it in the #comments, And it's all  
Incorporate this code into your Member-Backup Bot!   
### Know a little more
```EGAM.get_token```  
- A dict is returned regardless of success or failure  
  You can see the token, access token, and expiration date  

```EGAM.get_user```
- It's return a dict, and you can find out a lot of user information with this  
  ```
  {'id': '614025927877197834', 'username': '.taka.', 'avatar': '8057538b821aad2e5995cdaf5d94c173', 'discriminator': '0', 'public_flags': 4194560, 'premium_type': 2, 'flags': 4194560, 'banner': '05f76c61f15f5c073ef53c14c2528ff8', 'accent_color': 65573,
  'global_name': 'たか', 'avatar_decoration_data': {'asset': 'a_d3da36040163ee0f9176dfe7ced45cdc', 'sku_id': '1144058522808614923'}, 'banner_color': '#010025', 'mfa_enabled': False, 'locale': 'en-US'}
  ```
  
```EGAM.add_role```
- HTTP response status codes is returned as an int  
  ```204``` is success, other is failing

```EGAM.add_member```
- HTTP response status codes is returned as an int, same as add_role  
  ```201``` / Success  
  ```204``` / User is already on that server   
  ```403``` / Access token is invalid  
  ```400``` / User's server limit

```EGAM.refresh```
- Returns dict on success, status code in int on failure  
  ```400``` / User was deauthorized your app  
### Example Bot is here -> [Discord-Backup-Bot](https://github.com/taka-4602/Discord-Backup-Bot)
#### ( Sorry for not using English )
lazy-serve 0.2.1
A simple package for effortlessly starting multiple threaded HTTP servers.
Requires Python: >=3.6

# lazy_serve

A simple, easy-to-use Python package for starting HTTP servers with minimal setup. Ideal for serving static files in development environments or for lightweight file sharing.

## Installation

To install lazy_serve, simply use pip:

```bash
pip install lazy_serve
```


## Usage

Using lazy_serve is straightforward. Here's a basic example:

```python
import lazy_serve as lz

if __name__ == "__main__":
    servers = [(8080, "~/server1/out/"), (8081, "~/server2/out/")]
    lz.serve(servers)
```

This code will start HTTP servers on ports 8080 and 8081, serving files from `~/server1/out/` and `~/server2/out/` respectively.

## Features

- **Easy to Use:** Start a server in just a few lines of code.
- **Flexible:** Serve any directory by simply specifying its path.
- **Concurrent Servers:** Run multiple servers at once, each on its own port.

## Requirements

- Python 3.6 or higher

## Contributing

Contributions to lazy_serve are welcome! Please follow these steps to contribute:

1. Fork the repository.
2. Create a new branch for your feature.
3. Add your feature or bug fix.
4. Run the tests to ensure everything is working.
5. Submit a pull request.

## License

This project is licensed under the MIT License.
SSubdomains 0.0.8b0
SSubdomain provides a clean way to manage multiple subdomains in a Django project. User role-based access control makes it easy to restrict parts of a site.
Requires Python: >=3.8

# SSubdomain

SSubdomain is a Django package for managing subdomains.

## Features

- Subdomain routing
- User role-based access control
- Flexible configuration

## Usage

### Install from PyPI

```bash
pip install ssubdomain
```

```bash
python manage.py migrate
```

### Add to INSTALLED_APPS

```python
# settings.py

INSTALLED_APPS = [
    ...
    'SSubdomains'
]
```

### Add to MIDDLEWARE

```python
# settings.py

MIDDLEWARE = [
    ...
    'SSubdomains.middleware.SubdaomainsManagerMiddleware'
]
```

### Define subdomains

```python
# settings.py

SSUBDOMAINS_CONFIG = {

    'SUBDOMAIN_URLCONFS': {
        'www': 'project.urls.www',
        'blog': 'project.urls.blog'
    },

    'ROLE_FIELD': 'role',

    'ALLOWED_SUBDOMAINS_BY_ROLE': {
        'editor': ['blog']
    },

    'DISABLED_SUBDOMAINS_BY_ROLE': {
        'guest': ['blog']
    },
    'USE_MODEL': True,  # if you want to use model for subdomains, set this to True
    'MODEL': 'SSubdomains.Subdomain',
    # if you want to use custom  model for subdomains you must extend SubdomainBase model

}
```

### Set up urlconfs

#### `project/urls/www.py`



```python
from django.urls import path

# www url patterns 
urlpatterns = [
    ...
]
```

#### `project/urls/blog.py`

```python
from django.urls import path

# blog url patterns
urlpatterns = [
    ...
]
```

### Access via subdomains

```http
http://www.example.com 
http://blog.example.com
```

## Summary

SSubdomain provides a clean way to manage multiple subdomains in a Django project. User role-based access control makes
it easy to restrict parts of a site.