Skip to main content

Create a template for pypi repo

Project description

Matrix PyPI Package Template

The Matrix PyPI Package Template is a basic template project creator uploading your project to PyPi packages index and make it globally available to the whole python community

Installation

You can install the Matrix PyPI Package Template from PyPI:

pip install matrix-pypitmp

The package is supported on Python 2.7, as well as Python 3 and above.

How to use

The Matrix PyPI Package Template is a command line application, named mtrxtmp. To create a template for your package to upload in pypi index simply call the program by specifying your project name and path to create it :

$ mtrxtmp [options] args ...

Specify the project name and path you want to create it

optional arguments:
    -h, --help            show this help message and exit
    --name PROJECT_NAME, 
	-n PROJECT_NAME  	  Name of the Project 
    --path PATH, -p PATH  Path to project template to be created

Example :

$mtrxtmp --name PROJECT_NAME --path "/PATH/TO/CREATE/PROJECT"

Running the program without an argument creates a project template with default name('matrix-pypi-template') in current working directory

The use of this package ends here.Now if your want to publish your package to pypi, follow the below steps: Requirements : Python Packages:

setuptools wheel twine

External Requirements : Accounts in PyPi and Test PyPI

Once the Project Template is adjusted to suit your project what needs to be done next is building your python package, It can be done by entering the following command in your project root directory :

$python setup.py sdist bdist_wheel

That should generate a build , dist and an egg for your project. To verify all the formats are correct we use a package called twine as below from your root directory:

$twine check dist/*

Now we have everything ready for our package upload :) .But.. we never tested how our newly created package works, so we upload to pypi test server to test and then upload to the actual one. To do that :

$twine upload --repository testpypi dist/*

This will ask for your test pypi username and password to upload Once this is done you have your package ready to test from test pypi server and can be installed with

$pip install --index-url https://test.pypi.org/simple/ --no-deps example-pkg-YOUR-USERNAME-HERE

Now you can test your package and make any adjustments if needed and upload to pypi by making a new dist if required. To uplaod into actual pypi repository all you need to do is enter the following command in your adjusted projects root folder

$twine  upload  dist/*	

It will ask for your pypi username and password to upload and you are done you can check your package in https://pypi.tw.martin98.com/project/YOUR_PACKAGE-NAME-HERE/

for more detailed guide on packaging your project and uploading check Python's Official Guide on Packaging

Project details


Download files

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

Source Distribution

matrix-pypitmp-1.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

matrix_pypitmp-1.0.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file matrix-pypitmp-1.0.2.tar.gz.

File metadata

  • Download URL: matrix-pypitmp-1.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for matrix-pypitmp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 222d79e1bcbbde27a86fdf0c1bbc7bf8ea9966048f90ce9f624c0c739c1b07a6
MD5 b8ffc670f892e573d3edf7b8eb438955
BLAKE2b-256 04f1634288c940205a8e50e54f24b2cfb6c6a3090b343ac1b29980bb9af15404

See more details on using hashes here.

File details

Details for the file matrix_pypitmp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: matrix_pypitmp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for matrix_pypitmp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7442cb4130080ac1a8c0c0c4353aa7e8e36bfcd0fb3dba6a3153a0e68c2b86e3
MD5 8993a836a640d333e6c232efba617dd7
BLAKE2b-256 b8d0c5e24976d1b72b2e4396f974737c2a319af36424e2a2e46a0038035e8a02

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