0

I'm newbie to python and it's philosophy. I'm trying to develop a module on github. Is there any Ruby's gem generator like tool for developing module? How to develop a module? Thank you for any advise.

1 Answer 1

2

You don't need a tool to create a python module, any filename ending in .py is sufficient. A package, which is a collection of modules, is similarly created by the presence of a file named __init__.py in the same folder as other modules (and possibly other packages). The __init__.py file can be empty or not, your choice.

Best practices dictate that importing a module should have no side effects; It should define classes and functions, but take no action. python modules should start with a docstring explaining the purpose of the module and how it should be used.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for educate me. Did you know good example of python module on github?
There's nothing in particular you need to do to use github to host python source code. Just follow the directions on github Bootcamp to set up git and create a repo, then just do all of your coding in the same folder that you used git init.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.