Giter Site home page Giter Site logo

pyskel's Introduction

python cookiecutter for a new python project

I developed this project structure so that I am not always doing the same thing ;-)

I tried to use pyprojectbuilder, but after some time I decided to keep it simple and use this approach when I need to create a new python project. This project its a skeleton of python projects.

Features

  • provides a "standard" python project structure
  • provides a setup.py that can be used like "python setup.py sdist bdist_wheel" to create local dists
  • provides a folder named data including a png file
  • provides two entry points that , after installing the wheel package, installs two exe in windows -> only tried in windows
  • provides a clean.bat file that erases the pycache, dist, build and project_name.egg-info folders -> only tried in windows

Read this first

First, see what Cookiecutter is: https://cookiecutter.readthedocs.io/en/latest/readme.html

How to use this project

cookiecutter https://

or download this cookiecutter projet to your hard drive and

cookiecutter path_to_your_cookiecutter

Rename the keywords and start coding.

After eating the cookiecutter :-)

You get this:

  • an app that reads a user config file from %appdata%{{cookiecutter.project_name}}\config.yaml (overides system config)
  • an app that reads a system config file from c:\python3.x\site-packages{{cookiecutter.project_name}}\config.yaml
  • and app that creates two exe after installation of wheel package:
    • {{cookiecutter.project_name}}-cmd1.exe that executes function main of main.py
    • {{cookiecutter.project_name}}-cmd2.exe that executes function main of dothings.oy

Dependencies: PyYAML

Creating a source package (creates a project_name.tar.gz in dist folder)

python setup.py sdist

Creating a wheel package (creates a project_name.whl in dist folder)

python setup.py bdist_wheel

Creating a source package and wheel package

python setup.py sdist bdist_wheel

Install and test local source distribution

python -m venv venv

source venv/bin/activate

pip install app.tar.gz or pip install app.whl

The packages will be in installed in venv/lib/python3.x/site-packages/app-package (so will be the code) The data folder will be in installed in venv/lib/python3.x/site-packages/app-package/data

Uninstall: just delete the venv and your test directory

pyskel's People

Contributors

brunogoncalooliveira avatar

Watchers

 avatar

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.