Skip to main content

Package to fix all your coding problems.

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.

Build Badge

CI / CD

Installation

Install the pyexcuses module with pip:

pip3 install pyexcuses

If you want to look at all the functions, make your way to the example program, which shows you how to use each function in pyexcuses.

Python

Access the excuses in your own project by importing pyexcuses and using the function generate_excuse:

>>> import pyexcuses
>>> print(pyexcuses.generate_excuse())
It works on my machine, but maybe the server environment is different.

We can use spoken languages for English and Spanish, and we have excuses for different programming languages:

>>> import pyexcuses
>>> print(pyexcuses.generate_excuse("es"))  # spanish excuse
Funciona en mi máquina, pero quizás el entorno del servidor sea diferente
>>> print(pyexcuses.generate_excuse("es", "javascript"))  # spanish excuse for javascript programming language
El CSS está luchando con JavaScript de nuevo.

Access the solutions in your own project by importing pyexcuses and using the function suggest_solution:

>>> import pyexcuses
>>> print(pyexcuses.suggest_solution())
Try running it on a Friday—bugs don't like weekends.

We also have solutions for different spoken languages and programming languages:

>>> import pyexcuses
>>> print(pyexcuses.suggest_solution("es"))  # spanish solution
"¿Has probado a añadir más comentarios a tu código?
>>> print(pyexcuses.suggest_solution("es", "javascript"))  # spanish solution for javascript programming language
¿Has probado a añadir más puntos y comas? A JavaScript le encantan.

We have a list_available_options function that lets you check which languages (spoken or programming) are supported by the package.

>>> import pyexcuses
>>> print(pyexcuses.list_available_options("spoken_language")) # print all spoken langs
['en', 'es']
>>> print(pyexcuses.list_available_options("programming_language")) # print all programming langs
['python', 'javascript', 'neutral']

Finally, the get_multilingual_excuse_or_solution function provides an excuse or solution in both English and Spanish for any given programming language. 

```pycon
>>> import pyexcuses
>>> print(pyexcuses.get_multilingual_excuse_or_solution("excuse", "python")) # get both spanish and english
'en': 'It works on my machine.',
'es': 'Funciona en mi máquina.'

# Get a multilingual solution in English and Spanish for JavaScript
solution = pyexcuses.get_multilingual_excuse_or_solution("solution", "javascript")
print(solution)
# Output:
# {
#    'en': 'Have you tried clearing the cache?',
#    'es': '¿Has probado a limpiar la caché?'
# }


## Contributing to pyexcuses

Since we love contributions, if you’d like,  pleasefollow these steps to help us out.

1. **Clone the repository**:
   ```console
   git clone https://github.com/<your-username>/pyexcuses.git
   cd pyexcuses

2. **Create a Branch**
    ```console
    git checkout -b feat/name


3. **Install dependencies and SetUp Virtual Environment**"
    ```console
    python -m pip install --upgrade pip
    pip install pipenv
    pipenv install --dev

4. **Make Your Changes**

5. **Run tests**"
    ```console
    pipenv run pytest

6. **Commit/Push Edits**"
    ```console
    git add .
    git commit -m "Your Changes"
    git push origin feat/name

7. **Make Pull Requests**

## Team members

- [Darren Zou](https://github.com/darrenzou)
- [Peter D'Angelo](https://github.com/dangelo729)
- [Gene Park](https://github.com/geneparkmcs)
- [Joseph Chege](https://github.com/JosephChege4)

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.

pyexcuses-0.0.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pyexcuses-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyexcuses-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pyexcuses-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ce833b9bae15010ae7004bfc9f4ad36817d1666c2c783d5ee7121d048398994
MD5 72a4fbbb06f37d9bb6852bdf7b5b717d
BLAKE2b-256 4e0ff7a6d6f4fb0f3576f5ef8cc2624f707d7f0a92f2abf460a39e833ce0700e

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