Skip to main content

A set of common tools.

Project description

Gadget

A wide variety of tools in the software development.

1 Gadget Abstract List

1.1 dict2class

Convert a parameter from "dict" type to simple User-defined class type.

Such as:

# Import required packages
from gadget import Dict2Class
import datetime

# Defines a dictionary
test_dict = {
    'now': datetime.datetime.now(),
    'num': 77,
    'txt': 'Hello!',
    'dct': {
        't_num': 667,
        't_txt': 'hello!'
    },
    'lst': [1, 2, 3, 'abc'],
    'set': {1, 3, 3, 4, 'abc'},
    'tpl': (1, 2, 3, 5, 'abc')
}

# Converts to user-defined class here
ud_class = Dict2Class().convert(test_dict)

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

gadgetpie-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

gadgetpie-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file gadgetpie-0.0.1.tar.gz.

File metadata

  • Download URL: gadgetpie-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for gadgetpie-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fda8a2f534308e5e00a5f3533d40af4863fd7cc284fc3ca6a82837601e2d0571
MD5 e5b844324c1804f2a89d61f46f534c18
BLAKE2b-256 089fdaaaa9a4454379cea8cc630cb20a3247e856795cad09b9425e800077efb1

See more details on using hashes here.

File details

Details for the file gadgetpie-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gadgetpie-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for gadgetpie-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48e95f2f4fcbc0556f8ee57f1645cea6d87d6b79335616144df49492654fffba
MD5 41fb95f28ca1370a0a7e19e3ac0e0b8c
BLAKE2b-256 6104606e0aa594066963f5e093bbc7beec4fad8fa6b547d2fde1d702d84bac15

See more details on using hashes here.

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