About 684,000 results
Open links in new tab
  1. What's the best practice using a settings(config) file in Python?

    The goal is to simplify using many arguments in a Python program by writing a config (settings) file that dynamically can add an item. What is the best practice for using a settings (config) file …

  2. What is the naming convention in Python for variables and …

    As the Style Guide for Python Code admits, The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent Note that this refers just to Python's …

  3. How do I write good/correct package __init__.py files

    Although all the functionality is implemented in modules and subpackages, your package docstring is the place to document where to start. For example, consider the python email …

  4. What's the best way to initialise and use constants across Python ...

    Oct 16, 2018 · Here's how I am declaring constants and using them across different Python classes: # project/constants.py GOOD = 1 BAD = 2 AWFUL = 3 # project/question.py from …

  5. What is the best practice for imports when developing a Python …

    Jan 1, 2023 · To conclude the question: What is the best practice to import modules and sub-packages freely and nicely from within sub-directories of a Python package that is currently …

  6. Python best practice in terms of logging - Stack Overflow

    Apr 14, 2023 · 44 When using the logging module from python for logging purposes. Is it best-practice to define a logger for each class? Considering some things would be redundant such …

  7. Best Practices Python - Where to store API KEYS/TOKENS

    Jul 11, 2019 · Best practices for api key safety, BY OPENAI. As they suggested, use environment variables in place of your API key. There are a lot of tutorials, such as How to set environment …

  8. What's the common practice for enums in Python? [duplicate]

    Apr 1, 2009 · How can I implement an enumeration type (spelled enum in some languages) in Python? What is the common practice to get this functionality?

  9. Folder naming convention for python projects - Stack Overflow

    Oct 16, 2018 · What is the naming convention in python community to set names for project folders and subfolders? my-great-python-project my_great_python_project …

  10. Best practice in python for return value on error vs. success

    My question is, what is the best practice in areas like this, and not just for lists?Return whatever the heck I want and make sure I document it for a user to read? :-) What do most of you folks …