useless-facts-package


Nameuseless-facts-package JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/yourusername/useless-facts
SummaryA Python package that returns random useless facts. So useless in fact that it's actually usefull.
upload_time2025-10-21 23:34:07
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Useless Facts

A Python package that returns random useless facts to brighten your day! 🎉

With over **500+ useless facts** across 5 categories, you'll never run out of entertaining trivia!

## Installation

You can install the package using pip:

```bash
pip install useless-facts
```

## Usage

### Basic Usage

```python
from useless_facts import get_random_fact

# Get a random fact
fact = get_random_fact()
print(fact)
# Output: "A group of flamingos is called a 'flamboyance'."
```

### Get Facts by Category

```python
from useless_facts import get_random_fact, get_fact_by_category, get_categories

# Get a random fact from a specific category
animal_fact = get_random_fact("animals")
print(animal_fact)
# Output: "Octopuses have three hearts and blue blood."

# Get all facts from a category
all_animal_facts = get_fact_by_category("animals")
print(all_animal_facts)

# Get all available categories
categories = get_categories()
print(categories)
# Output: ['animals', 'science', 'history', 'food', 'random']
```

### Advanced Usage

```python
from useless_facts import get_all_facts, get_fact_count

# Get all facts organized by category
all_facts = get_all_facts()
print(all_facts)

# Get the total number of facts
total_facts = get_fact_count()
print(f"Total facts available: {total_facts}")
```

## Available Categories

- **animals**: Facts about animals and wildlife
- **science**: Scientific facts and discoveries
- **history**: Historical facts and events
- **food**: Food-related facts and trivia
- **random**: Miscellaneous interesting facts

## API Reference

### Functions

- `get_random_fact(category=None)`: Get a random fact from all categories or a specific category
- `get_all_facts()`: Get all facts organized by category
- `get_fact_by_category(category)`: Get all facts from a specific category
- `get_categories()`: Get all available categories
- `get_fact_count()`: Get the total number of facts

## Examples

```python
import useless_facts

# Get a random fact
print(useless_facts.get_random_fact())

# Get a science fact
print(useless_facts.get_random_fact("science"))

# Get all animal facts
animal_facts = useless_facts.get_fact_by_category("animals")
for fact in animal_facts:
    print(fact)
```

## Development

To install the package in development mode:

```bash
git clone https://github.com/yourusername/useless-facts.git
cd useless-facts
pip install -e .
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Changelog

### 1.0.0
- Initial release
- Added 500+ useless facts across 5 categories
- Basic API for accessing facts
- 102 animal facts
- 100 science facts
- 98 history facts
- 103 food facts
- 102 random facts

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/useless-facts",
    "name": "useless-facts-package",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "Your Name <your.email@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/65/23/ff7c8c7a6581e527be755582f7a79d851779c3402e882a3e09844282c7d2/useless_facts_package-1.0.0.tar.gz",
    "platform": null,
    "description": "# Useless Facts\n\nA Python package that returns random useless facts to brighten your day! \ud83c\udf89\n\nWith over **500+ useless facts** across 5 categories, you'll never run out of entertaining trivia!\n\n## Installation\n\nYou can install the package using pip:\n\n```bash\npip install useless-facts\n```\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom useless_facts import get_random_fact\n\n# Get a random fact\nfact = get_random_fact()\nprint(fact)\n# Output: \"A group of flamingos is called a 'flamboyance'.\"\n```\n\n### Get Facts by Category\n\n```python\nfrom useless_facts import get_random_fact, get_fact_by_category, get_categories\n\n# Get a random fact from a specific category\nanimal_fact = get_random_fact(\"animals\")\nprint(animal_fact)\n# Output: \"Octopuses have three hearts and blue blood.\"\n\n# Get all facts from a category\nall_animal_facts = get_fact_by_category(\"animals\")\nprint(all_animal_facts)\n\n# Get all available categories\ncategories = get_categories()\nprint(categories)\n# Output: ['animals', 'science', 'history', 'food', 'random']\n```\n\n### Advanced Usage\n\n```python\nfrom useless_facts import get_all_facts, get_fact_count\n\n# Get all facts organized by category\nall_facts = get_all_facts()\nprint(all_facts)\n\n# Get the total number of facts\ntotal_facts = get_fact_count()\nprint(f\"Total facts available: {total_facts}\")\n```\n\n## Available Categories\n\n- **animals**: Facts about animals and wildlife\n- **science**: Scientific facts and discoveries\n- **history**: Historical facts and events\n- **food**: Food-related facts and trivia\n- **random**: Miscellaneous interesting facts\n\n## API Reference\n\n### Functions\n\n- `get_random_fact(category=None)`: Get a random fact from all categories or a specific category\n- `get_all_facts()`: Get all facts organized by category\n- `get_fact_by_category(category)`: Get all facts from a specific category\n- `get_categories()`: Get all available categories\n- `get_fact_count()`: Get the total number of facts\n\n## Examples\n\n```python\nimport useless_facts\n\n# Get a random fact\nprint(useless_facts.get_random_fact())\n\n# Get a science fact\nprint(useless_facts.get_random_fact(\"science\"))\n\n# Get all animal facts\nanimal_facts = useless_facts.get_fact_by_category(\"animals\")\nfor fact in animal_facts:\n    print(fact)\n```\n\n## Development\n\nTo install the package in development mode:\n\n```bash\ngit clone https://github.com/yourusername/useless-facts.git\ncd useless-facts\npip install -e .\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Changelog\n\n### 1.0.0\n- Initial release\n- Added 500+ useless facts across 5 categories\n- Basic API for accessing facts\n- 102 animal facts\n- 100 science facts\n- 98 history facts\n- 103 food facts\n- 102 random facts\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package that returns random useless facts. So useless in fact that it's actually usefull.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/useless-facts"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "afe085ae4522d31455ce007af6dc0fceefb6956f9c842880be01ce741844d638",
                "md5": "0c344d8df30ee909f3e671420b2f73eb",
                "sha256": "358a5c381c29b43892674d514257a12defee6b8735ce65c99fcd453b0731e5d6"
            },
            "downloads": -1,
            "filename": "useless_facts_package-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c344d8df30ee909f3e671420b2f73eb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15669,
            "upload_time": "2025-10-21T23:34:06",
            "upload_time_iso_8601": "2025-10-21T23:34:06.686162Z",
            "url": "https://files.pythonhosted.org/packages/af/e0/85ae4522d31455ce007af6dc0fceefb6956f9c842880be01ce741844d638/useless_facts_package-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6523ff7c8c7a6581e527be755582f7a79d851779c3402e882a3e09844282c7d2",
                "md5": "14207503a4ee6657e1f57c29b17c20ab",
                "sha256": "5a7f1f9fbc8c7bf990e00fdb99bed048d09df81e212b21b4bff7b845ee10a780"
            },
            "downloads": -1,
            "filename": "useless_facts_package-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "14207503a4ee6657e1f57c29b17c20ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16660,
            "upload_time": "2025-10-21T23:34:07",
            "upload_time_iso_8601": "2025-10-21T23:34:07.829127Z",
            "url": "https://files.pythonhosted.org/packages/65/23/ff7c8c7a6581e527be755582f7a79d851779c3402e882a3e09844282c7d2/useless_facts_package-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-21 23:34:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "useless-facts",
    "github_not_found": true,
    "lcname": "useless-facts-package"
}
        
Elapsed time: 1.92113s