Code Monkey home page Code Monkey logo

python-helloworld's Introduction

Hello, World

A simple program, and an example of how to structure a python project. Demonstrates a basic package file structure (using flat layout) and a way to define a single package version shared between package metadata and program runtime.

See also: the Python Packaging User Guide at https://packaging.python.org/ offers more complete examples and explanations.

Basic usage

You can install the package using pip and then run the main script from the command line as helloworld_in_python or import it in python via import helloworld:

$ cd python-helloworld/  # Dir containing this repo's root
$ pip install .
$ helloworld_in_python
Hello, world
$ helloworld_in_python --version
helloworld 0.1
$ python
>>> import helloworld
>>> helloworld.__version__
'0.1'

You can also try it without installing by running python helloworld.py in the repository root:

$ python helloworld.py
Hello, world
$ python helloworld.py --version
helloworld 0.1

python-helloworld's People

Contributors

dbarnett avatar haizaar avatar hannhank avatar msomula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

python-helloworld's Issues

Update setup.py to use distutils

I think setuptools is a little dated and not the best recommendation for how to set up a new project. Should update setup.py for best packaging practices.

awesome project, mate

I'm just looking for something like this, google got me right into this project, awesome code, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.