用于未在特定包中分组的常规函数的python实用程序

ctodd-python-lib-general的Python项目详细描述


Christopher H.Todd的通用任务Python库

ctodd python lib general项目负责尚未放入特定库中的常规任务。基本上将是一次性任务的转储地,这些任务是可重复的,但不会调用可扩展的特定库。

目录

依赖关系

python包

  • 请求>;=2.21.0

downloader.py

允许从给定URL下载文件并保存到给定位置的库

功能:

def download_file(url, file_location=None, overwrite=False):
    """
    Purpose:
        Download file from specified URL and store in a specfied location.
        If no location is provided, the file is downloaded in the current
        directory. If overwrite is false, the file is not downloaded.
    Args:
        url (string): Full URL path to download file from.
        file_location (string): Full path to where file will be stored.
        overwrite (Boolean): Whether or not to overwrite file if it already
            exists
    Return
        file_location (string): Full path to where file was be stored.
    """

脚本示例

用于测试和与库交互的示例可执行python脚本/模块。这些示例显示了库的用例,可以用作与库一起开发的模板,也可以用作一次性开发工作。

不适用

注释

  • 依赖于f-string符号,它仅限于python3.6。通过重构删除这些内容,可以使用python3.0.x到3.5.x进行开发

待办事项

  • UnitTest框架已就位,但缺少测试

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java数据未插入SQLite数据库   Java中内存有效的对象创建   java在方法内部使用“this”(不用于调用方法、构造函数或变量)   java为什么这里会出现NullPointerException?   在REST中使用HATEOAS导致的java循环依赖   java如何定制spring boot横幅?   Java数字基数计算器(即基数10到基数5)   如果在Kotlin vs Java中声明,用作全局上下文的安卓 MainApplication类将崩溃   用于过滤对象的Java lambda函数   java从字符串数组中获取整数列表   java为什么Maven找不到org。json JPMS自动模块?   java将字符串数组转换为int   仅当与阈值字节匹配时,java才会在映射中填充字符串值