wolfsoftware.magic8ball

A simple python package to replicate a Magic 8Ball.

https://github.com/thegrotshop/magic8ball

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

pypi pypi-package python python-package wolfsoftware
Last synced: 6 months ago · JSON representation ·

Repository

A simple python package to replicate a Magic 8Ball.

Basic Info
  • Host: GitHub
  • Owner: TheGrotShop
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 107 KB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 4
  • Releases: 1
Topics
pypi pypi-package python python-package wolfsoftware
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Codeowners Security

README.md

TheGrotShop logo
Github Build Status License Created
Release Released Commits since release

Overview

Overview

Magic 8-Ball is a Python package that emulates the classic Magic 8-Ball toy, providing randomized responses to yes-or-no questions. This package is designed to be both interactive and usable in various applications, allowing developers to integrate a fun, nostalgic feature into their projects.

Features

  • 20 traditional Magic 8-Ball responses (positive, neutral, and negative).
  • Simple API to ask questions and get a response.
  • Custom error handling for invalid inputs.
  • Includes comprehensive test coverage.

Installation

bash pip install wolfsoftware.magic8ball

Usage

Basic Example

Once installed, you can use the Magic 8-Ball package in your Python code.

```python from wolfsoftware.magic8ball import Magic8Ball

Create an instance of Magic8Ball

magic_ball = Magic8Ball()

Ask a yes/no question

response = magicball.askquestion("Will it rain tomorrow?") print("Magic 8-Ball says:", response) ```

Handling Errors

The ask_question method raises an InvalidQuestionError if the question provided is not a non-empty string. Make sure to validate the input or handle this exception as shown:

```python from wolfsoftware.magic8ball import Magic8Ball, InvalidQuestionError

magic_ball = Magic8Ball()

try: response = magicball.askquestion("Will I get a promotion?") print("Magic 8-Ball says:", response) except InvalidQuestionError as e: print("Error:", e) ```


Owner

  • Name: The Grot Shop
  • Login: TheGrotShop
  • Kind: organization
  • Email: github@wolfsoftware.com
  • Location: United Kingdom

Grot has lots of things that aren’t of any use, some of them are red, some of them are green and some of them are puce.

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: Magic 8Ball
abstract: A simple Magic 8Ball Python package.
type: software
version: 0.1.0
date-released: 2024-11-14
repository-code: https://github.com/TheGrotShop/magic-8ball
keywords:
  - "Wolf Software"
  - "Software"
license: MIT
authors:
  - family-names: "Wolf"
    orcid: "https://orcid.org/0009-0007-0983-2072"

GitHub Events

Total
  • Release event: 2
  • Watch event: 1
  • Delete event: 78
  • Issue comment event: 156
  • Push event: 115
  • Pull request review event: 95
  • Pull request event: 149
  • Create event: 83
Last Year
  • Release event: 2
  • Watch event: 1
  • Delete event: 78
  • Issue comment event: 156
  • Push event: 115
  • Pull request review event: 95
  • Pull request event: 149
  • Create event: 83

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 59
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: 5 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 1.76
  • Merged pull requests: 37
  • Bot issues: 1
  • Bot pull requests: 59
Past Year
  • Issues: 1
  • Pull requests: 59
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: 5 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 1.76
  • Merged pull requests: 37
  • Bot issues: 1
  • Bot pull requests: 59
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (73)
Top Labels
Issue Labels
Pull Request Labels
dependabot: dependencies (73) dependabot: ecosystem : github actions (53) dependabot: auto approve (49) dependabot: auto merge (45) dependabot: ecosystem : python (20) dependabot: manual merge (15) state: stale (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 9 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: wolfsoftware.magic8ball

A simple package to implement a Magic 8Ball.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 9 Last month
Rankings
Dependent packages count: 10.0%
Average: 33.3%
Dependent repos count: 56.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/cicd.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • actions/setup-python 0b93645e9fea7318ecaed2b359559ac225c90a2b composite
.github/workflows/citation-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • citation-file-format/cffconvert-github-action 4cf11baa70a673bfdf9dad0acc7ee33b3f4b6084 composite
  • ruby/setup-ruby 7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 composite
.github/workflows/codeql.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • github/codeql-action/analyze a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
  • github/codeql-action/autobuild a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
  • github/codeql-action/init a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
.github/workflows/delete-old-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • Mattraks/delete-workflow-runs 39f0bbed25d76b34de5594dceab824811479e5de composite
.github/workflows/dependabot.yml actions
  • dependabot/fetch-metadata dbb049abf0d677abbd7f7eee0375145b417fdd34 composite
.github/workflows/document-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • actions/setup-node 39370e3970a6d050c480ffad4ff0ed4d3fdee5af composite
  • ruby/setup-ruby 7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 composite
.github/workflows/generate-release.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • actions/setup-python 0b93645e9fea7318ecaed2b359559ac225c90a2b composite
  • softprops/action-gh-release c062e08bd532815e2082a85e87e3ef29c3e6d191 composite
.github/workflows/generate-test-release.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • actions/setup-python 0b93645e9fea7318ecaed2b359559ac225c90a2b composite
  • softprops/action-gh-release c062e08bd532815e2082a85e87e3ef29c3e6d191 composite
.github/workflows/greetings.yml actions
  • actions/first-interaction 34f15e814fe48ac9312ccf29db4e74fa767cbab7 composite
.github/workflows/purge-deprecated-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • otto-de/purge-deprecated-workflow-runs 31a4e821d43e9a354cbd65845922c76e4b4b3633 composite
.github/workflows/repository-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • actions/setup-go 41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed composite
  • actions/setup-python 0b93645e9fea7318ecaed2b359559ac225c90a2b composite
.github/workflows/security-hardening.yml actions
  • actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
  • zgosalvez/github-actions-ensure-sha-pinned-actions ed00f72a3ca5b6eff8ad4d3ffdcacedb67a21db1 composite
.github/workflows/stale.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • actions/stale 28ca1036281a5e5922ead5184a1bbf96e5fc984e composite
requirements-dev.txt pypi
  • pytest ==8.2.2 development
  • setuptools ==70.1.1 development
requirements.txt pypi
setup.py pypi