Skip to content
/ altf1be_helpers Public template

Helpers used by the www.alt-f1.be team such as request_retry_session, unicode_to_ascii, count_files_in_dir, date_utc, daterange, hide_secrets_from_url

License

Notifications You must be signed in to change notification settings

ALT-F1/altf1be_helpers

Repository files navigation

altf1be_helpers

Helpers to deal with basic requirements of an application built by www.alt-f1.be. See https://bitbucket.org/altf1be/altf1be_helpers

  • management of a JSON File: Load, save, save with datetime.

usage

  • install the package on pypi.org :

    • install : pip install altf1be_helpers
    • upgrade : pip install altf1be_helpers --upgrade
  • install the package on test.pypi.org :

    • install : pip install -i https://test.pypi.org/simple/altf1be_helpers
    • upgrade : pip install -i https://test.pypi.org/simple/altf1be_helpers --upgrade

dependencies

Build the package

test the library altf1be_helpers

  • cd altf1be_helpers

  • python altf1be_helpers_unittest.py

  • python altf1be_json_helpers_unittest.py

  • locate the package

    • python -c "from altf1be_helpers import AltF1BeHelpers as _; print(_.__path__)" does not work yet
  • list functions inside the module

    • the package python -c "import altf1be_helpers as _; print(dir(_))"
  • test the package

    • python -c "from altf1be_helpers import AltF1BeHelpers; text='éê à iïî'; print(f'{AltF1BeHelpers.unicode_to_ascii(text)}')"
    • result : ee a iii

test the library altf1be_helpers

  • cd altf1be_helpers

  • python altf1be_json_helpers_unittest.py

  • locate the package

    • python -c "from altf1be_json_helpers import AltF1BeJSONHelpers as _; print(_.__path__)" does not work yet
  • list functions inside the module

    • the package python -c "import altf1be_helpers as _; print(dir(_))"
  • test the package

    • python -c 'import os;from altf1be_helpers import AltF1BeJSONHelpers; altF1BeJSONHelpers = AltF1BeJSONHelpers();data = altF1BeJSONHelpers.load(os.path.join("data", "altf1be_sample.json"));print(data)'
    • result : {"name": "altf1be_json_helpers"}

Documentation

License

Copyright (c) ALT-F1 SPRL, Abdelkrim Boujraf. All rights reserved.

Licensed under the EUPL License, Version 1.2.

See LICENSE in the project root for license information.

About

Helpers used by the www.alt-f1.be team such as request_retry_session, unicode_to_ascii, count_files_in_dir, date_utc, daterange, hide_secrets_from_url

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages