This release is a pre-release and may not be stable for production use.
Argteller
The argteller package provides the class and method decorators for visual and interactive class object constructor. It frees the user from needing to constantly refer to documentations to figure out what arguments are required and what parameter values are valid inputs. It lists required arguments parsimoniously by only asking the parameters as needed, depending on the previously provided argument values. You can easily encode them in the custom DSL (domain specific language) script.
This tool is useful in the Jupyter interface. It thus caters to the Python’s interactive development capability. It also helps with code reproducibility by providing an easy way to share the parameter configurations.
Install
pip3 install argteller-viz
What does it do?
Let’s take an example use case. Let’s say you have two classes Vehicle and Rider. Each class has the following __init__ signatures:
class Vehicle():
def __init__(self, vehicle_type, n_doors=None, car_name=None, n_motors=None, boat_name=None):
"""
Parameters
----------
vehicle_type : str
Valid inputs: "car" or "boat"
n_doors : int
Only used when vehicle_type is "car". Valid inputs: 2 or 4
car_name : str
Only used when vehicle_type is "car".
n_motors : int
Only used when vehicle_type is "boar". Valid inputs: 1, 2, or 3
boat_name : str
Only used when vehicle_type is "boar"
"""
# ...Vehicle class definition
class Rider():
def __init__(self, rider_name, rider_height, rider_weight):
"""
Parameters
----------
rider_name : str
rider_height : float
rider_weight : float
"""
# ...Rider class definition
Note the following: (1) there may be predefined list of valid input values for a given parameter and (2) some arguments are required only conditionally (e.g. n_doors is not needed if vehicle_type is set to “boat”). As the number of parameters grow, these will become harder to keep track of, requiring the user to constantly refer to the documentation to figure out the signature requirements.
Without going into code details, let us see what argteller can do for us. The argteller lets us define a separate class, say, CoolConstructor. If you initialize CoolConstructor you will see interactive widgets that will help you fill out the required arguments:
cool_constructor = CoolConstructor()
If you click “car”, the argteller will show you the conditionally required parameters, which you can fill in likewise.
You can fill in the parameter values for the Rider class by clicking on the Rider tab.
Argteller solves the problem of needing to know (1) the (potentially very long) list of parameters, (2) which parameters are required conditionally, and (3) what argument values are valid inputs, where it helps reduce time and hassle to type them in by making them into buttons that you can simply click on to choose.
But how does this work, and how can we use the cool_constructor object to initialize our classes? In sections below, we will explain those details. Also, argteller can do so much more than the short sneak peek demo we just saw. We will slowly get into the rest of the functionalities that argteller has to offer as well.
DSL
Metadata
Release files for argteller-viz 0.0b45
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| argteller-viz-0.0b45.tar.gz | 16.9 kB | Without provenance | Details for argteller-viz-0.0b45.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argteller_viz-0.0b45-py3-none-any.whl | Python 3 | none | any | Details for argteller_viz-0.0b45-py3-none-any.whl |
Total release size: 38.8 kB
Release files / argteller-viz-0.0b45.tar.gz
| Download URL | argteller-viz-0.0b45.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9caf3505299738b862e8f5bf36e9d05720575545ddb2366e7f415ba22e196685
|
|
BLAKE2b-256 checksum How to use checksums |
13057b5f9280b8f88126e8b8467cf6b33b3c03f17366aa3865d9f4717e91d406
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
|
Release files / argteller_viz-0.0b45-py3-none-any.whl
| Download URL | argteller_viz-0.0b45-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66c9d0e5a8142b456d2968acc61dae168a4dcd4adc01d1d97ba2b3c5a67fd3c3
|
|
BLAKE2b-256 checksum How to use checksums |
1516e664b298a23bb3d9db155ae954d2dc28601ae4d81622e4bf7dd2ba744cd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
|
Security for argteller-viz 0.0b45
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.