Skip to main content

No project description provided

Project description

lobs

PyPI - Version PyPI - Python Version

lobs is a framework that aims to provide an easy application and library project generator.

A simple C++ application example

from pathlib import Path

import lobs

main_cpp = Path(__file__).with_name("main.cpp")
main_cpp.write_text("""
#include <iostream>

int main(int argc, char *argv[])
{
    (void)(argc);
    (void)(argv);
    std::cout << "Howdy!\n";
    return 0;
}
""")

app = lobs.Package(
    lobs.ProjectMeta("example-app", lobs.Version(0, 0, 1, "rc1")),
    lobs.cpp.ManagedApplication([main_cpp]),
)
"""A simple C++ application project with a single source file,
no dependencies and default flags."""

# Example of modifying the project configuration after object creation
app.project.compilation_flags.w_all = True
# Example of enabling flags using dictionary-like access
app.project.compilation_flags['w_extra'] = True
# Example of adding a flag that was not predefined in the dataclass
app.project.compilation_flags['w_comment'] = True

Table of Contents

Installation

pip install lobs

Design

Various design choices were heavily based on the Zen of Python.

All files exist in the disk

A limitation imposed by the framework to the Python language is that all executed code must be sourced from a file in disk. The rationale is the commonuse of the module's path by the exporters.

Explicit library imports in project files

The main reason for this is the reuse of editor and linting tools support. Futhermore, it provides clarity to the user of what is being used and where it comes from.

Everything is monkey-patchable

In standard Python, almost everything is monkey-patcheable by the user. By design, the library aims to keep it that way.

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off". Yes, I said something like that (in 1986 or so). What people tend to miss, is that what I said there about C++ is to a varying extent true for all powerful languages. As you protect people from simple dangers, they get themselves into new and less obvious problems. Someone who avoids the simple problems may simply be heading for a not-so-simple one. One problem with very supporting and protective environments is that the hard problems may be discovered too late or be too hard to remedy once discovered. Also, a rare problem is harder to find than a frequent one because you don't suspect it.

-- Bjarne Stroustrup @ https://www.stroustrup.com/quotes.html

Developer

TODO

License

lobs is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_lobs-0.1.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_lobs-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file py_lobs-0.1.1.tar.gz.

File metadata

  • Download URL: py_lobs-0.1.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_lobs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f88f92194aadfa94e55163f321e7cc90516b9acc90dc373fb92ed0abb7767032
MD5 48e69373820f1d9a18ea1d18b6040d0e
BLAKE2b-256 f351ce3c260592a00ec77bead727090c1aa98449f69e295462bdd6fd9cf2730c

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_lobs-0.1.1.tar.gz:

Publisher: pypi-builder.yml on rikardonm/lobs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_lobs-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: py_lobs-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_lobs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aba6d89edd39912d8d9ec65fa1708d33feb14127d6fa3471535f8f725133bc95
MD5 711eeedc199bdda42a083cf83352391e
BLAKE2b-256 a39a2bf45172a0d918970fa1b8c04381332957f71476f4e5af305ab37634624d

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_lobs-0.1.1-py3-none-any.whl:

Publisher: pypi-builder.yml on rikardonm/lobs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page