semvec/pypi-packages huggingface dataset:
vex-cog-utils 1.5.9
Utility functions for the Vex-Cogs repo.
Requires Python: >=3.8.1

# Vex-Cog-Utils

If you've come here on PyPI, hello! You're welcome to use this wherever, just be aware it requires ``Red-DiscordBot`` which is not in the requirements due to the circumstances this is used by myself.

---

Utility functions for the Vex-Cogs repo, for Red-DiscordBot

There is nothing stopping you from using this in your own cogs, however some of the stuff here is geared towards my cogs. I would recommend you pin the version.

Docstrings fully document each function.

## Versioning

``major.minor.patch``

Major releases are likely to include breaking changes. There **can** me breaking changes in minor releases. There will be nothing breaking in patch releases.
vendoring 1.2.0
A command line tool, to simplify vendoring pure Python dependencies.
Requires Python: ~= 3.8

# vendoring

A command line tool, to simplify vendoring pure Python dependencies.

## Why does this exist?

pip had a "home-grown" setup for vendoring dependencies. The `invoke` task grew in complexity to over 500 lines and, at some point, became extremely difficult to improve and maintain.

This tool is based off the overgrown `invoke` task, breaking it out into a dedicated codebase with the goal of making it more maintainable and reusable. This also enabled independent evolution of this codebase and better access to infrastructure (like dedicated CI) to ensure it keeps working properly.

## Should I use it?

This tool has no stability promises -- it has only one intended user: pip. There may be unannounced changes to this codebase at any time, as long as the intended user (i.e. the pip project) is prepared for those changes.

As a general rule of thumb, if the project is going to be a PyPI package, it should not use this tool.

Many downstream redistributors have policies against this kind of bundling of dependencies, which means that they'll patch your software to debundle it. This can cause various kinds of issues, due to violations of assumptions being made about where the dependencies are available/which versions are being used. These issues result in difficult-to-debug errors, which are fairly difficult to communicate with end users.

pip is a _very_ special case with a [thorough rationale][rationale] for
vendoring/bundling dependencies with itself.

[rationale]: https://pip.pypa.io/en/latest/development/vendoring-policy/#rationale

## Contributing

Check the [Contributing](CONTRIBUTING.md) guide.
fs-map 0.0.3
Python内置文件和路径处理函数的集合和扩展。

# fs-map

#### 项目简介
    Python内置文件和路径处理函数的集合和扩展。

#### 安装教程
```
pip install fs-map
```

#### 功能说明
* 集成函数
1. os 模块
``` python
# 函数列表
'''
listdir, 
mkdir, 
rename, 
replace, 
rmdir,
remove,
makedirs,
removedirs,
renames
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/os.html#module-os
``` 
2. os.path 模块
``` python
# 函数列表
'''
exists, 
getsize, 
isdir, 
isfile, 
normcase, 
isabs, 
join, 
splitdrive, 
split, 
splitext, 
basename, 
dirname, 
normpath, 
abspath, 
realpath, 
relpath
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/os.path.html#module-os.path
``` 
3. shutil 模块
``` python
# 函数列表
'''
copyfileobj, 
copyfile, 
copymode, 
copy, 
copy2, 
ignore_patterns, 
copytree, 
rmtree, 
move
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/shutil.html#module-shutil
```
4. glob 模块
``` python
# 函数列表
'''
glob, 
glob0, 
glob1, 
iglob,
escape
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/glob.html#module-glob
```

* 扩展函数
``` python
def get_filename(path):
    '''
    Returns a file name with a suffix
    '''

    _, filename = split(path)
    return filename


def get_filename1(path):
    '''
    Returns a file name that does not contain a suffix
    '''

    filename = get_filename(path)
    filename, _ = splitext(filename)
    return filename


def get_ext(path):
    '''
    Returns the file suffix
    '''

    _, ext = splitext(get_filename(path))
    return ext


def normcase1(path):
    '''
    Converts all characters in the path to lowercase and forward slashes to backslashes
    '''

    return normcase(path).replace('\\', '/')


def normpath1(path):
    '''
    Converts forward slashes in a path to backslashes
    '''

    return normpath(path).replace('\\', '/')
```

#### 实例
``` python
import fs


'''
集成函数实例
'''
# 判断文件是否存在
print(fs.exists('file.txt'))


'''
扩展函数实例
'''
# 获取文件后缀
print(fs.get_ext('c:/a/b/c.txt'))
# 输出结果：.txt

# 获取带后缀的文件名
print(fs.get_filename('c:/a/b/c.txt'))
# 输出结果：'c.txt'

# 获取不带后缀的文件名
print(fs.get_filename1('a.c.txt'))
# 输出结果：'a.c'

# 路径标准化的
print(fs.normcase1('c:\\A/b/c.txt'))
# 输出结果：c:/a/b/c.txt
print(fs.normpath1('c:\\A/b/c.txt'))
# 输出结果：c:/A/b/c.txt
```

#### 参考文献
https://docs.python.org/zh-cn/3/py-modindex.html
ljh-example 0.2.6
Python内置文件和路径处理函数的集合和扩展

# fs-map

#### 项目简介
    Python内置文件和路径处理函数的集合和扩展。

#### 安装教程
```
pip install fs-map
```

#### 功能说明
* 集成函数
1. os 模块
``` python
# 函数列表
'''
listdir, 
mkdir, 
rename, 
replace, 
rmdir,
remove,
makedirs,
removedirs,
renames
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/os.html#module-os
``` 
2. os.path 模块
``` python
# 函数列表
'''
exists, 
getsize, 
isdir, 
isfile, 
normcase, 
isabs, 
join, 
splitdrive, 
split, 
splitext, 
basename, 
dirname, 
normpath, 
abspath, 
realpath, 
relpath
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/os.path.html#module-os.path
``` 
3. shutil 模块
``` python
# 函数列表
'''
copyfileobj, 
copyfile, 
copymode, 
copy, 
copy2, 
ignore_patterns, 
copytree, 
rmtree, 
move
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/shutil.html#module-shutil
```
4. glob 模块
``` python
# 函数列表
'''
glob, 
glob0, 
glob1, 
iglob,
escape
'''

# 参考文档 
# https://docs.python.org/zh-cn/3/library/glob.html#module-glob
```

* 扩展函数
``` python
def get_filename(path):
    '''
    Returns a file name with a suffix
    '''

    _, filename = split(path)
    return filename


def get_filename1(path):
    '''
    Returns a file name that does not contain a suffix
    '''

    filename = get_filename(path)
    filename, _ = splitext(filename)
    return filename


def get_ext(path):
    '''
    Returns the file suffix
    '''

    _, ext = splitext(get_filename(path))
    return ext


def normcase1(path):
    '''
    Converts all characters in the path to lowercase and forward slashes to backslashes
    '''

    return normcase(path).replace('\\', '/')


def normpath1(path):
    '''
    Converts forward slashes in a path to backslashes
    '''

    return normpath(path).replace('\\', '/')
```

#### 实例
``` python
import fs


'''
集成函数实例
'''
# 判断文件是否存在
print(fs.exists('file.txt'))


'''
扩展函数实例
'''
# 获取文件后缀
print(fs.get_ext('c:/a/b/c.txt'))
# 输出结果：.txt

# 获取带后缀的文件名
print(fs.get_filename('c:/a/b/c.txt'))
# 输出结果：'c.txt'

# 获取不带后缀的文件名
print(fs.get_filename1('a.c.txt'))
# 输出结果：'a.c'

# 路径标准化的
print(fs.normcase1('c:\\A/b/c.txt'))
# 输出结果：c:/a/b/c.txt
print(fs.normpath1('c:\\A/b/c.txt'))
# 输出结果：c:/A/b/c.txt
```

#### 参考文献
https://docs.python.org/zh-cn/3/py-modindex.html