Welcome to Example Project’s documentation!

Introduction

Description

This is an example project that is used as practice for learning packaging.

Features

Example Python Project officially supports Python 3.7–3.10.

  • Feature 1
  • Feature 2
  • Feature 3

Source Code

The source code is currently hosted on GitHub at:

LICENSE

MIT

Contributions

All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.

Installation

GitHub

The source code is currently hosted on GitHub at:

pip

The project is hosted on pyPI at:

To install Example Project, simply use pip:

pip install example

Quickstart

This is a short introduction to Example Project, geared mainly for new users.

Importing Example Project:

from example import example_code as ex

Random Number Generator

To generate a integer between start and stop simply use:

output = ex.random_number_generator(0, 10)

Random Sequence Generator

To generate a list of length length consisting of integers between start and stop use:

output = ex.random_sequence_generator(5, 0, 10)

User Guide

The User Guide covers all of Example Project by alpabetical order. This page also functions as an API-reference guide, since it covers all public objects in Example Project.

example.example_code.random_number_generator(start, stop)

Returns a random number between start and stop.

Parameters:
  • start (int) – Lowest possible number.
  • stop (int) – Highest possible number.
Returns:

A random integer between start and stop.

Return type:

int

Examples

>>> random_number_generator(0, 10)
5  #random
example.example_code.random_sequence_generator(length, start, stop)

Returns a list of random numbers between start and stop.

Parameters:
  • length (int) – Length of the list.
  • start (int) – Lowest possible number.
  • stop (int) – Highest possible number.
Returns:

A list of random integers between start and stop.

Return type:

list

Raises:

ValueError – If length < 1

Examples

>>> random_sequence_generator(5, 0, 10)
[3, 4, 9, 5, 2]  #random

Indices and tables