Skip to main content

This package extends the the py-package ‘automodinit’ with the option also to import classes and functions inside a module.

If classes/functions have the same name as modules they will override them. This is useful if the ‘one class/function per file’ principle is used

autoXinit is listed in the Python Package Index. You can install it typing ‘pip install autoxinit’.

To init your package with autoXinit add the following to your __init__.py:

__all__ = []
# Don't modify the line above, or this line!
from autoxinit import autoxinit
autoxinit(__name__, __file__, globals())
del autoxinit

autoXinit also provides a test package. Importing this module via:

from autoxinit import test
  1. Execute the test environment

  2. Imports all modules AND all included (dummy) functions/classes. If a function/class share the same same with its parent module calling the modules name leeds to the function/class.

File structure of the test package:

  • testClass.py
    • class testClass

  • testFunction.py
    • def testFunction

  • testModule.py
    • class testModuleClass

    • def testModuleFunction

Instead of typing:

from test.testClass import testClass
from test.testFunction import testFunction

You can import your classes/functions directly via:

from test import testClass
from test import testFunction

As written before the imported names are only overridden if the name of a class/function is identical to the name of the module. That’s why you can still access:

from test import testModule
from testModule import testModuleClass
from testModule import testModuleFunction

Release files for autoxinit 0.1.2

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

Source distribution (sdist)

Source distribution for autoxinit 0.1.2
File Size Uploaded
autoxinit-0.1.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autoxinit 0.1.2
File Interpreter ABI Platform
autoxinit-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.4 kB

Release files / autoxinit-0.1.2.tar.gz

Download URL autoxinit-0.1.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ca7d8fe483eb9863be86d34f45f7e4c1893dc275d0819c14170b4591cd35da46
BLAKE2b-256 checksum
How to use checksums
36c9e3045294d6872782f04651ecda5066ed2da278f7df1c2a551e69fd2f577c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / autoxinit-0.1.2-py2.py3-none-any.whl

Download URL autoxinit-0.1.2-py2.py3-none-any.whl
Size 6.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ff127a0ba6b0147454c51891f08a40d5738769adc259ad399ca93b7edcdf7781
BLAKE2b-256 checksum
How to use checksums
3c077075b5ca4c0570ebbeed096235ddc39a0e2429e3ed9523d7737b1e7f6753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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