randfacts


Namerandfacts JSON
Version 0.22.1 PyPI version JSON
download
home_pagehttps://tabulate.tech/software/randfacts/
SummaryPackage to generate random facts
upload_time2025-02-07 06:20:28
maintainerNone
docs_urlNone
authorTabulateJarl8
requires_python<4.0,>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
</p>
<p align="center">
	<a href="https://badge.fury.io/py/randfacts"><img alt="PyPI" src="https://img.shields.io/pypi/v/randfacts" /></a>
	<a href="https://aur.archlinux.org/packages/python-randfacts/"><img alt="AUR version" src="https://img.shields.io/aur/version/python-randfacts"></a>
	<a href="https://pepy.tech/project/randfacts"><img alt="Downloads" src="https://pepy.tech/badge/randfacts" /></a>
	<a href="https://pypi.python.org/pypi/randfacts/"><img alt="PyPI license" src="https://img.shields.io/pypi/l/randfacts.svg" /></a>
	<a href="https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
	<a href="https://GitHub.com/TabulateJarl8/randfacts/issues/"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg" /></a>
	<a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
	<a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
	<a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
	<br>
	<a href="https://ko-fi.com/L4L3L7IO2"><img alt="Kofi Badge" src="https://ko-fi.com/img/githubbutton_sm.svg" /></a>
</p>

Randfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.

# Installation

randfacts can either be installed via pip or via the AUR, whichever way you prefer.

### Installation via pip:

```sh
$ pip3 install randfacts
```

### Installation via AUR:

Via your AUR helper, like paru:
```sh
$ paru -S python-randfacts
```

Or manually
```sh
$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
$ makepkg -si
```

# Usage and examples

```python
import randfacts
x = randfacts.get_fact()
print(x)
```
The above example will print a random fact like:
`Penguins can't taste sweet or savory flavors, only sour and salty ones`

This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
```python
from randfacts import get_fact
print(get_fact(False))
# or
print(get_fact(filter_enabled=False))
```

`get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:

```py
print(get_fact(only_unsafe=True))
```

If you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.


## Command line usage

randfacts can be executed via the command line with the following commands:

Normal execution; only SFW (safe for work) facts

```sh
$ python3 -m randfacts
```

The unsafe argument can be supplied to provide only NSFW (not safe for work) facts

```sh
$ python3 -m randfacts --unsafe
```

The mixed argument can be provided to provide both SFW and NSFW facts.

```sh
$ python3 -m randfacts --mixed
```

More help.

```sh
$ python3 -m randfacts --help
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://tabulate.tech/software/randfacts/",
    "name": "randfacts",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "TabulateJarl8",
    "author_email": "tabulatejarl8@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3c/ce/4a5f13f2e3cedea8bab143f6dd228edcc103034953538e278c3b462913fe/randfacts-0.22.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg\" />\n</p>\n<p align=\"center\">\n\t<a href=\"https://badge.fury.io/py/randfacts\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/randfacts\" /></a>\n\t<a href=\"https://aur.archlinux.org/packages/python-randfacts/\"><img alt=\"AUR version\" src=\"https://img.shields.io/aur/version/python-randfacts\"></a>\n\t<a href=\"https://pepy.tech/project/randfacts\"><img alt=\"Downloads\" src=\"https://pepy.tech/badge/randfacts\" /></a>\n\t<a href=\"https://pypi.python.org/pypi/randfacts/\"><img alt=\"PyPI license\" src=\"https://img.shields.io/pypi/l/randfacts.svg\" /></a>\n\t<a href=\"https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity\"><img alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /></a>\n\t<a href=\"https://GitHub.com/TabulateJarl8/randfacts/issues/\"><img alt=\"GitHub Issues\" src=\"https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg\" /></a>\n\t<a href=\"https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml\"><img alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test\" /></a>\n\t<a href=\"https://github.com/TabulateJarl8\"><img alt=\"GitHub followers\" src=\"https://img.shields.io/github/followers/TabulateJarl8?style=social\" /></a>\n\t<a href=\"https://github.com/TabulateJarl8/randfacts\"><img alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social\" /></a>\n\t<br>\n\t<a href=\"https://ko-fi.com/L4L3L7IO2\"><img alt=\"Kofi Badge\" src=\"https://ko-fi.com/img/githubbutton_sm.svg\" /></a>\n</p>\n\nRandfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.\n\n# Installation\n\nrandfacts can either be installed via pip or via the AUR, whichever way you prefer.\n\n### Installation via pip:\n\n```sh\n$ pip3 install randfacts\n```\n\n### Installation via AUR:\n\nVia your AUR helper, like paru:\n```sh\n$ paru -S python-randfacts\n```\n\nOr manually\n```sh\n$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts\n$ makepkg -si\n```\n\n# Usage and examples\n\n```python\nimport randfacts\nx = randfacts.get_fact()\nprint(x)\n```\nThe above example will print a random fact like:\n`Penguins can't taste sweet or savory flavors, only sour and salty ones`\n\nThis package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.\n```python\nfrom randfacts import get_fact\nprint(get_fact(False))\n# or\nprint(get_fact(filter_enabled=False))\n```\n\n`get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:\n\n```py\nprint(get_fact(only_unsafe=True))\n```\n\nIf you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.\n\n\n## Command line usage\n\nrandfacts can be executed via the command line with the following commands:\n\nNormal execution; only SFW (safe for work) facts\n\n```sh\n$ python3 -m randfacts\n```\n\nThe unsafe argument can be supplied to provide only NSFW (not safe for work) facts\n\n```sh\n$ python3 -m randfacts --unsafe\n```\n\nThe mixed argument can be provided to provide both SFW and NSFW facts.\n\n```sh\n$ python3 -m randfacts --mixed\n```\n\nMore help.\n\n```sh\n$ python3 -m randfacts --help\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package to generate random facts",
    "version": "0.22.1",
    "project_urls": {
        "Homepage": "https://tabulate.tech/software/randfacts/",
        "Repository": "https://github.com/TabulateJarl8/randfacts"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58b26bd60403c847518e5e4d786f07e12d7e4772b8ac68af5d83447ee95dbca4",
                "md5": "9f6a1f3ab1b7ffa8db57eae93672b516",
                "sha256": "1b2c54af1bfc20770b64e7ca623d6b250f132f125faf7e2c9f78c739e998ead8"
            },
            "downloads": -1,
            "filename": "randfacts-0.22.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f6a1f3ab1b7ffa8db57eae93672b516",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.6",
            "size": 273282,
            "upload_time": "2025-02-07T06:20:27",
            "upload_time_iso_8601": "2025-02-07T06:20:27.334765Z",
            "url": "https://files.pythonhosted.org/packages/58/b2/6bd60403c847518e5e4d786f07e12d7e4772b8ac68af5d83447ee95dbca4/randfacts-0.22.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3cce4a5f13f2e3cedea8bab143f6dd228edcc103034953538e278c3b462913fe",
                "md5": "838b8b3d7aebf86e3f5b1ec01c4dadbc",
                "sha256": "950865fce95e2050fe5ab2b40d66f208e0b0192a0956f79dbbf582170aee35e3"
            },
            "downloads": -1,
            "filename": "randfacts-0.22.1.tar.gz",
            "has_sig": false,
            "md5_digest": "838b8b3d7aebf86e3f5b1ec01c4dadbc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.6",
            "size": 272430,
            "upload_time": "2025-02-07T06:20:28",
            "upload_time_iso_8601": "2025-02-07T06:20:28.742171Z",
            "url": "https://files.pythonhosted.org/packages/3c/ce/4a5f13f2e3cedea8bab143f6dd228edcc103034953538e278c3b462913fe/randfacts-0.22.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 06:20:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TabulateJarl8",
    "github_project": "randfacts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "randfacts"
}
        
Elapsed time: 0.39376s