{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Building your Python package\n", "\n", "\n", "Building your own Python package is easy. \n", "\n", "You need to:\n", "\n", "- make a folder where you will store your package\n", "- create the relevant configuration files\n", "- write the code you want your package to contain\n", "- `pip` install it\n", "\n", "We go over these steps here, and then you should **practice**.\n", "\n", "\n", "## What is a Python package?\n", "\n", "\n", "A Python package is an ensemble of functions that serve a specific purpose.\n", "\n", "The library of functions is often split into multiple files, containing subset of functions, the split follows common sense. \n", "Each subset/file is often referred to as a *module*. \n", "\n", "An example of a well-maintained package is [getdist](https://github.com/cmbant/getdist).\n", "\n", "
| \n", " | Open | \n", "High | \n", "Low | \n", "Close | \n", "Volume | \n", "Dividends | \n", "Stock Splits | \n", "
|---|---|---|---|---|---|---|---|
| Date | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
| 2024-09-26 00:00:00-04:00 | \n", "126.800003 | \n", "127.669998 | \n", "121.800003 | \n", "124.040001 | \n", "302582900 | \n", "0.0 | \n", "0.0 | \n", "
| 2024-09-27 00:00:00-04:00 | \n", "123.970001 | \n", "124.029999 | \n", "119.260002 | \n", "121.400002 | \n", "271009200 | \n", "0.0 | \n", "0.0 | \n", "
| 2024-09-30 00:00:00-04:00 | \n", "118.309998 | \n", "121.500000 | \n", "118.150002 | \n", "121.440002 | \n", "226553700 | \n", "0.0 | \n", "0.0 | \n", "
| 2024-10-01 00:00:00-04:00 | \n", "121.769997 | \n", "122.440002 | \n", "115.790001 | \n", "117.000000 | \n", "302094500 | \n", "0.0 | \n", "0.0 | \n", "
| 2024-10-02 00:00:00-04:00 | \n", "116.440002 | \n", "119.379997 | \n", "115.139999 | \n", "118.849998 | \n", "221845900 | \n", "0.0 | \n", "0.0 | \n", "