Skip to main content

A Docker and AWS utility package

Project description

Install python3

apt install python3

Install Virtual Environment

$ apt-get install python3-pip

$ apt-get update

$ apt install python3.8-venv

$ python3 -m pip install --user virtualenv

$ python3 -m venv env

$source env/bin/activate

Install the required packages:

  1. Setuptools: Setuptools is a package development process library designed for creating and distributing Python packages.

  2. Wheel: The Wheel package provides a bdist_wheel command for setuptools. It creates .whl file which is directly installable through the pip install command. We'll then upload the same file to pypi.org.

  3. Twine: The Twine package provides a secure, authenticated, and verified connection between your system and PyPi over HTTPS.

  4. Tqdm: This is a smart progress meter used internally by Twine.

python3 -m pip install --upgrade pip setuptools wheel python3 -m pip install tqdm python3 -m pip install --upgrade twine

Build your package: python3 setup.py bdist_wheel

Test Installing on to local machine from whl file: python3 -m pip install dist/kansan-0.1-py3-none-any.whl

or

pip3 install dist/kansan-0.1-py3-none-any.whl

Create file ~/.pypirc

[distutils] index-servers=pypi [pypi] repository = https://upload.pypi.org/legacy/ username = kansalster

Upload on pip: python3 -m twine upload dist/* --skip-existing

You can change the package version in setup.py and upload the new version to pypi.org

Login in to pypi and check the package there. https://pypi.org/

pip3 install tree pip3 install kansan

Now login in to azure devops and create feed with no upstream option. Click on the connect to feed and get the file pip.conf content and save it on your machine in /etc/pip.conf e.g. [global] index-url=https://:@pkgs.dev.azure.com/kansalster/lastproject/_packaging//pypi/simple/

Now try installing any pip library

pip3 install tree pip3 install kansan

Now we will push our package new version on to azure feed.

  1. Change the version number
  2. Push it to azure feed this time using command

python -m twine upload -r feedName --config-file dist/*.whl

  1. this should fail until upstream option is disabled.
  2. Once you enabled upstream option, you should be able to install any library
  3. The package will be saved to feed first and then installed on your machine so that next request does not go to upstream
  4. you can also set the retention of the packages saved in to feed.

Now lets write the azure pipeline to build the package and push it to pypi and make it available to use for consumers.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

kansan-0.5-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file kansan-0.5-py3-none-any.whl.

File metadata

  • Download URL: kansan-0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for kansan-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1288f8d9f1b9d9a191eedc22d90e7cb653e425d23fb50d93e40e317dd0ab15bb
MD5 cce64b891bf9dc9e359955d20dc65b1b
BLAKE2b-256 e406721b109526283de2da6958b1068369b6dd7fb9797b480642103aa00b764c

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