Skip to main content

Python support functions package

Project description

skylynx

Status

Build Status

Python support functions module

Only Python 3


Version 0.0.3

skylynx

import skylynx
print('skylynx', skylynx.__version__)

>> skylynx 0.0.2

skylynx.utils

JSON

Write
import skylynx.utils as su

data_dict = dict(
    a=123,
    b='skylynx'
)
su.json_write('example.json', data_dict)
{
  "a": 123,
  "b": "skylynx"
}
Read
data = su.json_read('example.json')
print(data)

>> {'a': 123, 'b': 'skylynx'}

YAML

Write
su.yaml_write('example.yaml', data_dict)
a: 123
b: skylynx
Read
data = su.yaml_read('example.yaml')
print(data)

>> {'a': 123, 'b': 'skylynx'}

Pretty Print

data_dict = dict(
    a='This print a python dict object in a human readable form.',
    b=456,
    c=dict(
        d=123,
        e='skylynx'
    ),
    f = ['abc', 123]
)
su.pprint(data_dict, '> Header <')
======================== > Header < ========================
a: This print a python dict object in a human readable form.
b: 456
c:
  d: 123
  e: skylynx
f: ['abc', 123]
------------------------------------------------------------

Make Directories

path = 'path/to/the/folder/'
su.makedirs(path)
print(os.path.exists(path))

>> True

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

skylynx-0.0.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

skylynx-0.0.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file skylynx-0.0.3.tar.gz.

File metadata

  • Download URL: skylynx-0.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for skylynx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a3d6dc63aa4d92f085d5ecd499fbf66c5283b2cd1a880fb35a6a91d574f577c6
MD5 7d7bbe8aabf277477265bf3bc35c41ce
BLAKE2b-256 750e7d0c3606fb63b22c3dbb051f7f2d6273d49dd9066089abbb4d63de0f36bc

See more details on using hashes here.

File details

Details for the file skylynx-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: skylynx-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for skylynx-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ada867f027f911f74f767be27ece28da9c0ed63394785a3b3da9b23b94e8697
MD5 1f7ca045780f69747da9122767f50bd5
BLAKE2b-256 7e1c49158f1f7de4949a69288babab75884e6bf602d608925bda27412957bca4

See more details on using hashes here.

Supported by

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