Skip to main content

A package that provides fortune telling features, developed with pyenv, built with build using setuptools, uploaded to PyPI using twine, and distributed via pip.

Project description

Python Package Exercise

An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.

Team Members

Product Description

Pytarot is a lighthearted Python package designed to offer fun and whimsical insights into life’s mysteries. This package includes:

  1. Random Answers of Wisdom: Provides insightful or humorous responses to user questions.
  2. Daily Action: Randomly generate positive reminders and suggestions for the day.
  3. True Lover Generator: Randomly generates a “true lover” profile for fun.
  4. Lucky Day Generator: Suggests a lucky day in the current month for the user.

System Setup and Environment Configuration Guide

Prerequisites

  • Python (version 3.6 or later)
  • pip (Python package installer)
  • pipenv (for managing virtual environments)

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/yourusername/pytarot.git
    cd pytarot
    
  2. Set Up Virtual Environment with Pipenv: Initialize a virtual environment and install dependencies in editable mode:

pipenv install -e .
  1. Activate the Virtual Environment: Start the virtual environment created by pipenv:
pipenv shell
  1. Running the Package
    You can run individual functions directly in the Python interactive shell or use the main.py script.

Running Functions in Python Shell
Open the Python shell:

python
  1. Import and test the package functions:
from src.pytarot import get_answers_of_wisdom, get_lucky_day, get_true_lover

print(answersofwisdom.get_answers_of_wisdom())
print(luckyday.get_lucky_day())
print(truelover.get_true_lover())
print(positive_action.get_positive_message())
  1. Running main.py
    Alternatively, you can execute the main.py file to run the package as a script:
python main.py
  1. Deactivate the Virtual Environment
    When you’re done, exit the pipenv shell:
exit
  1. How to Run Unit Tests
    Unit tests are located in the test directory and can be run using pytest.

Install pytest (if not already installed in the virtual environment):

pipenv install pytest
  1. Run Tests: Run all tests from the main project directory:
python -m pytest

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

pytarot-0.1.0.tar.gz (47.4 kB view details)

Uploaded Source

Built Distribution

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

pytarot-0.1.0-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file pytarot-0.1.0.tar.gz.

File metadata

  • Download URL: pytarot-0.1.0.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pytarot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f2d917517b242fb6f988c70cd643288a1cea540cc72df0b621c658d3c607af3
MD5 f14e6be0a163e361d3086cafe4d3be8f
BLAKE2b-256 b22da01bf76614883a091d0786b2fcd443c982309a0e47dad7aa31fb2bb201cd

See more details on using hashes here.

File details

Details for the file pytarot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytarot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pytarot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3b115dafc2ab23720ec465cb74c5e3bb85c2b078239103049164fdd17179c8
MD5 ec4a99e864e347709c322991fde1a88b
BLAKE2b-256 4f95df66b2d0166f2b02bfdd6f756938cbfeeecff5ea2835286ac95370390d55

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