Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
303 views

How to implement a server application that can reload configuration without restart

I have a game server implemented in Python to which clients can connect and play against each other. I'd like to be able to reload configuration from a config file without restarting the server (as ...
luator's user avatar
  • 111
0 votes
1 answer
634 views

How to handle root paths in a custom package?

I am writing a custom python package, which produces some files in a certain directory. This directory I call root_path and should be set by the user. So basically, it should be a conf variable but ...
Corram's user avatar
  • 103
2 votes
1 answer
167 views

The notion of configurable strategies

I'm designing an algorithm that matches entries based on some notion of "proximity" (for the sake of discussion, assume we're matching floats). Furthermore: The input is a scalar and a ...
Dev-iL's user avatar
  • 233
0 votes
5 answers
284 views

Should I "modularize" my configuration file into different files?

I have a simulation in Python which reads its configuration from a toml file. Since I have tons of parameters, the toml file can grow quite large. This is an example file, similar in structure to my ...
jfaccioni's user avatar
  • 516
0 votes
1 answer
1k views

How to handle config/env vars in a library project

I am building a new Python library project to be consumed by several of my application projects. The existing code consumes environment variables for various configuration settings. Should my ...
Brian's user avatar
  • 183
1 vote
1 answer
251 views

Improvement of the config file management

I am working on a personal project for more than 6 months now, this project is composed of three distinct parts, simulation (wrapping a software), database related stuff (store the simulated data in a ...
th0mash's user avatar
  • 13
4 votes
3 answers
980 views

How to deal with configuration files that are becoming too complex

There is a db with tables of genes. And these genes would need to be annotated based on the client's needs. So if a gene matches condition x, then add a new column y and value z to that gene. Every ...
Claudiu Creanga's user avatar
0 votes
3 answers
326 views

Looking for best practices of storing configurations that will be read/write frequently

I'm writing a couple small python scripts to do tasks and act as 'bots' in some applications that will all read/write things for configuration and some very low-level logging of information; Whats the ...
Ben R's user avatar
  • 19
1 vote
0 answers
50 views

Manage several procedures

I have a software project which grows rapidly in an unexpected way, many customers request similar tasks but with slightly different needs and parameters. I start to dislike my current code structure ...
snowflake's user avatar
  • 153
93 votes
7 answers
29k views

How bad of an idea is it to use Python files as configuration files?

I've always used JSON files for configuration of my applications. I started using them from when I coded a lot of Java, and now I'm working mainly on server-side and data science Python development ...
André Christoffer Andersen's user avatar
2 votes
1 answer
1k views

Custom language with mixed markup and Python, parsing in Python

I need a system for creating Python subclasses in a simple manner, and I was thinking of using a (custom) config language similar to json, xml, etc. Here's the initial structure I thought of (one ...
Mahi's user avatar
  • 406
15 votes
3 answers
12k views

How to properly handle global parameters for unit testing in python?

We are implementing many algorithms which typically have lots of shared, publicly known and security-relevant parameters. Currently, we simply use a class holding all the parameters and two ...
netik's user avatar
  • 267
4 votes
4 answers
1k views

How to best encapsulate features in code and enabling/disabling them at runtime?

I would like to be able to abstract each feature developed by the team in a way that it can be enabled or disabled at runtime by using a distributed shared configuration system. Features are small and ...
Trasplazio Garzuglio's user avatar
7 votes
2 answers
11k views

How to handle configuration of Python modules, especially when used standalone and in frameworks like Django

I am trying to package a Python module for pip, following the guide here. One area I would like feedback on is best practices or convention for making my module configurable. The module is a library ...
user's user avatar
  • 173
1 vote
2 answers
200 views

Specifying options "hard coded", in an interpreted language

In a language like Python or JavaScript (NodeJS), is there anything wrong with defining "the configuration file" as a file which essentially hard-codes the configuration settings? For example: ...
Steve Bennett's user avatar

15 30 50 per page