Skip to main content

PyFastConfig

Fast creation and reading of files on Python with configurations.


Usage example:
import PyFastConfig as fc

Save

#Declare any values
min_t = 25
max_t = 35
arr = [45, 'hello', 81.5]

Quick save:

fc.save(min_t, max_t, arr)

Result file (Config.txt):

min_t = int(25)
max_t = int(35)
arr = list([45, 'hello', 81.5])

Optional options:

Name Accepts values Default
*args Arguments Required
file File name "config.txt"
mode Write modes:
"w" - rewrite
"a" - append
"w"
save_types True/False True
save_names True/False True
fc.save(*args, file="config.txt", mode="w", save_types=True, save_names=True)


Load

Quick load:

#import values (only if run_mode is not False)
#With copy namespace
exec(fc.load("config.txt"))

Import inside a function:

def func():
    exec(fc.load("config.txt", function_mode=True))

Optional options:

Name Explanation Default
file File name Required
run_mode Allows you to run (copy namespace) values
from the library and continue working
with them in the executable.
True
function_mode Does the same as run_mode, but inside a function. False
return_only_names True/False False
return_only_values True/False False
fc.load(file, run_mode=True, function_mode=False, return_only_names=False, return_only_values=False)

If you changed the parameters for saving additional information (save_types and save_names) in the SAVE function, you must disable run_mode when reading such a file.

#Returns an array (use if you have disabled any of the following options: save_types or save_names)
print(fc.load("config.txt", run_mode=False))

Release files for PyFastConfig 2.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 PyFastConfig 2.0
File Size Uploaded
PyFastConfig-2.0.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyFastConfig 2.0
File Interpreter ABI Platform
PyFastConfig-2.0-py3-none-any.whl Python 3 none any Details

Total release size:6.6 kB

Release files / PyFastConfig-2.0.tar.gz

Download URL PyFastConfig-2.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f74a27527d3d70c5f8d6c6794ff86736631c3570fc6220a6bd16217afb225230
BLAKE2b-256 checksum
How to use checksums
ebcfd255b55c5cf8e7e472ad74ee3a338510b9620c52734290fb3f96e58273ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.26.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Release files / PyFastConfig-2.0-py3-none-any.whl

Download URL PyFastConfig-2.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b49020952295a1f59cb45ab2c9133240528611e1e1a3cc872e5ce9c2609e9d05
BLAKE2b-256 checksum
How to use checksums
e8348a6cef334aadde6684b70d7eb9b9b51f97923d082661b4fbbac2dec1cb03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.26.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Release history Release notifications | RSS feed

This release

2.0 This release

2 release files

1.1

2 release files

1.0

2 release files

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