ALBA synchrotron python meta package
This is ALBA synchrotron python meta package.
Namespaces are one honking great idea -- let's do more of those!
source: The Zen of Python, by Tim Peters
How to create an alba sub-module
Let's say a new high pressure lab has been installed at ALBA which requires specific software. The goal is the user can type:
import alba.hplab
... to have access to ALBA's specific high pressure lab software.
Preparation
In the future there might be a cookie cutter for this. For now we have to bootstrap the project by hand:
- create a directory called
hplaband enter it. - create a directory called
alba - create a
alba/__init__.pyfile with a single line:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
It is crucial that the alba/__init__.py has this precise contents
and no more.
- create a setup.py has usual. Here is a minimal version:
# setup.py
from setuptools import setup, find_packages
setup(
name="alba-hplab",
author="ALBA controls team",
author_email="controls-software@cells.es",
packages=find_packages(),
description="ALBA controls HP Lab software",
version="0.0.1"
)
- create a
alba/hplabdirectory. This is where you should put the specific code for ALBA's HP lab.
By now you should have a structure like this
hplab/
├── alba
│ ├── hplab
│ │ └── __init__.py
│ └── __init__.py
└── setup.py
That's it! If you publish your package on pypi you will be able to install your software anywere with:
pip install alba-hplab
Metadata
Release files for alba 0.1.1
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 |
|---|---|---|---|---|
| alba-0.1.1.tar.gz | 2.1 kB | Without provenance | Details for alba-0.1.1.tar.gz |
Release files / alba-0.1.1.tar.gz
| Download URL | alba-0.1.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bc17519715d710c3a64f390e83f5774ef2099032ea57cbb0563811fd47cac2a
|
|
BLAKE2b-256 checksum How to use checksums |
b87c52521e2d845e8c24355831defe6bf5d5f690a21efc2d8e89ec5ab5ee3d4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.0.post20200616 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|
Security for alba 0.1.1
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.