Skip to main content

Foundations

https://secure.travis-ci.org/KelSolaar/Foundations.png?branch=master https://gemnasium.com/KelSolaar/Foundations.png

Introduction

Foundations is the core package of Oncilla, Color, Manager, Umbra, sIBL_GUI, sIBL_Reporter.It provides modules defining various utilities objects used in those packages.

Installation

The following dependencies are needed:

To install Foundations from the Python Package Index you can issue this command in a shell:

pip install Foundations

or this alternative command:

easy_install Foundations

You can also directly install from Github source repository:

git clone git://github.com/KelSolaar/Foundations.git
cd Foundations
python setup.py install

If you want to build the documentation you will also need:

Usage

Given the large spectrum of the objects defined in Foundations package, please refer to Foundations - Api for precise usage examples about each modules. Here are listed a few non exhaustive usage examples.

  • foundations.dataStructures.Structure:

    >>> person = Structure(firstName="Doe", lastName="John", gender="male")
    >>> person.firstName
    'Doe'
    >>> person.keys()
    ['gender', 'firstName', 'lastName']
    >>> person["gender"]
    'male'
    >>> del(person["gender"])
    >>> person["gender"]
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
    KeyError: 'gender'
    >>> person.gender
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
    AttributeError: 'Structure' object has no attribute 'gender'
  • foundations.dataStructures.Lookup:

    >>> person = Lookup(firstName="Doe", lastName="John", gender="male")
    >>> person.getFirstKeyFromValue("Doe")
    'firstName'
    >>> persons = foundations.foundations.dataStructures.Lookup(John="Doe", Jane="Doe", Luke="Skywalker")
    >>> persons.getKeysFromValue("Doe")
    ['Jane', 'John']
  • foundations.environment.Environment:

    >>> environment = Environment(JOHN="DOE", DOE="JOHN")
    >>> environment.setValues()
    True
    >>> import os
    >>> os.environ["JOHN"]
    'DOE'
    >>> os.environ["DOE"]
    'JOHN'
  • foundations.strings.getNiceName:

    >>> getNiceName("getMeANiceName")
    'Get Me A Nice Name'
    >>> getNiceName("__getMeANiceName")
    '__Get Me A Nice Name'
  • foundations.strings.getSplitextBasename:

    >>> getSplitextBasename("/Users/JohnDoe/Documents/Test.txt")
    'Test'
  • foundations.strings.getCommonPathsAncestor:

    >>> getCommonPathsAncestor("/Users/JohnDoe/Documents", "/Users/JohnDoe/Documents/Test.txt")
    '/Users/JohnDoe/Documents'
  • foundations.walkers.filesWalker:

    >>> for file in filesWalker("./foundations/tests/testsFoundations/resources/standard/level_0"):
    ...     print(file)
    ...
    ./foundations/tests/testsFoundations/resources/standard/level_0/level_1/level_2/standard.sIBLT
    ./foundations/tests/testsFoundations/resources/standard/level_0/level_1/loremIpsum.txt
    ./foundations/tests/testsFoundations/resources/standard/level_0/level_1/standard.rc
    ./foundations/tests/testsFoundations/resources/standard/level_0/standard.ibl
    >>> for file in filesWalker("./foundations/tests/testsFoundations/resources/standard/level_0", ("\.sIBLT",)):
    ...     print(file)
    ...
    ./foundations/tests/testsFoundations/resources/standard/level_0/level_1/level_2/standard.sIBLT

About

Foundations by Thomas Mansencal – 2008 - 2014
Copyright © 2008 - 2014 – Thomas Mansencal – thomas.mansencal@gmail.com
This software is released under terms of GNU GPL V3 license: http://www.gnu.org/licenses/

Metadata

Release files for Foundations 2.1.0

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

Source distribution (sdist)

Source distribution for Foundations 2.1.0
File Size Uploaded Provenance
Foundations-2.1.0.tar.gz 7.3 MB Without provenance Details

Release files / Foundations-2.1.0.tar.gz

Download URL Foundations-2.1.0.tar.gz
Size 7.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f2ca3c32b161949d17b4139b5d4b4f0044b7f3a7eed64f1f322bd5e5c9a913b7
BLAKE2b-256 checksum
How to use checksums
d4c4341b76267c3969b46170f715524259c1c170992253cb7c425d746cb2e322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Foundations 2.1.0

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.

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