Skip to main content

这是什么?

这是一个导入一次解耦方案, 封装了importlib并进行了底层的修改.

这能干什么?

from entrancebar.Import import Import
from entrancebar.sources import FromSitePackage, FromFileLocation

os, Path, getframe, join, thisfile = Import(
    os="os::$this",
    Path="pathlib::Path",
    getframe="sys::_getframe",
    join="os::path/join",
    thisfile="testfile::$this"
)(
    os=FromSitePackage("os"),
    pathlib=FromSitePackage("pathlib"),
    sys=FromSitePackage("sys"),
    testfile=FromFileLocation("./test.py")
) # 实际上, 导入不需要解构运算符, Import会直接把传入的具名实参导入到当前的globals()内.

所以这么没用的玩意发出来干啥?

给我自己用.

Metadata

Release files for entrancebar 0.0.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for entrancebar 0.0.27
File Size Uploaded Provenance
entrancebar-0.0.27.tar.gz 5.7 kB Without provenance Details

Release files / entrancebar-0.0.27.tar.gz

Download URL entrancebar-0.0.27.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1b1edd613ea26237028cf36239e61f4d26f1d1b95472ea9851019b6d8280ff70
BLAKE2b-256 checksum
How to use checksums
03591389a3fd1ddfcfb4d0f23336e52b3779cd2f9df6186091cd83b546bffb9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Security for entrancebar 0.0.27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page