Skip to main content

A quick and easy way to distribute your python projects!

Project description

ShipSnake

A quick and easy way to distribute your python projects!

Shipsnake will let you go from hello world to a published app in about 5 minutes! It generates a setup.py and correct directory structure for you in seconds, all with a simple config file.

In addition to this, it can build your Mac and Windows apps in the cloud using GitHub actions, so you don't need to have both a Mac and Windows computer to create apps. To use this feature, activate it with the wizard.

Please see the quickstart for an example.

Installation

Install with Pip: pip3 install shipsnake

Usage:

Note: Please use these commands in your base project directory, or they will fail.

It is suggested that you run shipsnake wizard to get started.

shipsnake wizard

This command runs a setup wizard that generates a shipsnake.toml file in your current directory. It will also help you set up GitHub actions and creat a git repo.

shipsnake dev

This command lets you test your project on your own system without needing to install it every time.

shipsnake [--options] build <version>

This command is where everything happens! There are several things that build does with the given version:

  1. First, it will build a directory structure that looks something like this.
.
├── .github
│   └── workflows
│       └── shipsnake.yml
├── bin
│   └── <compiled .sh files for your project>
├── build
│   └── <location where build data is generated>
├── dist
│   └── <compiled files ready for distribution>
├── <project name>
│   ├── # This is where your source code goes:
│   ├── __init__.py
│   ├── __main__.py
│   ├── mod1.py
│   ├── mod2.py
│   ├── data.txt
│   └── etc...
├── .gitignore
├── LICENSE
├── README.md
├── setup.py
└── shipsnake.toml
  1. Generate GitHub Actions workflow files
  2. Generate .app, .dmg, .exe, .msi files (depending on your configuration and system)
  3. Generate files used for PyPi distribution.

Options:

Some valid commandline options are:

  • -y: No interaction, always accept changes.

  • --actions-only: Only generate actions file.

  • --mac-only: Only generate mac file.

  • --windows-only: Only generate windows file.

  • --pypi-only: Only generate pypi files.

  • --setup-only: Only generate setup.py.

  • --no-installer: Overide installer config.

These options can be combined

shipsnake release [pypi | github]

This will upload your built project to PyPi and GitHub. (or just one of them, depending on the command options)

Quickstart

Let's say that we have a file helloworld.py:

name = input("What's your name? ")
print(f"Hello {name}!")

That's all fine and good, but how will we distribute our awesome app so that all ou relatives and friends can run it?

Whenever you have this problem, there are normally two solutions:

  • Get everyone to install Python, and then distribute copies of your source code.

  • Go through the trouble of packaging and distributing your project as a native application.

Both of these are less than ideal, but with shipsnake there is a third option:

  • Use shipsnake to distribute your project to PyPi, and also generate native applications and installers in about 5 minutes!

    • To do this we will need to install shipsnake: pip3 install shipsnake

    • Next, we will have to generate a shipsnake.toml file by running shipsnake wizard.

    • After we have done this, just type shipsnake build 0.0.1 and wait for the build process to finish.

    • Next, we have to get a PyPi account. Go to https://pypi.org/account/register/ to register.

    • After that, just type in shipsnake release to finish!

    • Now, you can install your app by typing pip3 install <your-app-name> and run it with <your-app-name> if you have Python, or by launching the packaged app in the ./dist/pyinstaller/ folder.

Contributors

  • Cole Wilson

Contact

cole@colewilson.xyz

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sailboat-0.0.dev8.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sailboat-0.0.dev8-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file sailboat-0.0.dev8.tar.gz.

File metadata

  • Download URL: sailboat-0.0.dev8.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sailboat-0.0.dev8.tar.gz
Algorithm Hash digest
SHA256 f8cf4f71c99f91da974a1caa4a5101703914a2562c720f307fa6bc574e502df8
MD5 d659bb66412a5703c176c4f7edc0e5c7
BLAKE2b-256 7b9ce6fb99c89b0a5e225e79c131d863f0c43c46d926eba987c2269bc904a89f

See more details on using hashes here.

File details

Details for the file sailboat-0.0.dev8-py3-none-any.whl.

File metadata

  • Download URL: sailboat-0.0.dev8-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sailboat-0.0.dev8-py3-none-any.whl
Algorithm Hash digest
SHA256 e23a21ed67f7c2b61bf33393599a5799a9a2f85f8414987e326df83e433b7b2f
MD5 80d6722e5e73afcf6fb0376959c2de41
BLAKE2b-256 df400ea2355a797768bae75be64a92733b33d49b8b83f5c6546b86ef223ab35f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page