is-seven


Nameis-seven JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/cwingho/is-seven
SummaryA library to check if a number is seven
upload_time2024-10-29 06:55:28
maintainerNone
docs_urlNone
authorBrian Chan
requires_python>=3.6
licenseNone
keywords seven number validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # is-seven

A simple yet powerful Python library that solves one of programming's most critical challenges: determining if a number is seven. ðŸ”Ē This library provides a robust, production-ready solution for the common programming task of seven detection and validation.

## Why is-seven?

Have you ever needed to check if a number is exactly seven? ðŸĪ” Of course you have! While it may seem trivial to write `number == 7`, using a dedicated library brings several benefits: âœĻ

The is-seven library offers numerous compelling advantages that make it the ideal choice for your seven-detection needs:

- Professionally tested and maintained code with comprehensive unit tests ✅ - Every release undergoes rigorous testing across multiple Python versions and platforms to ensure consistent behavior and reliability. Our test suite covers edge cases and validates core functionality.

- Clear, semantic API that documents your intent and improves code readability 📚 - The simple, expressive API makes code self-documenting. When other developers see `is_seven()` they immediately understand the validation being performed.

- Handles edge cases like strings and floating point numbers ðŸŽŊ - Beyond basic integer comparison, is-seven properly handles floating point precision, string parsing, and gracefully manages invalid inputs. No need to write your own type checking and conversion logic.

- Zero dependencies - lightweight and reliable ðŸŠķ - The library has absolutely no external dependencies, making it extremely lightweight and eliminating potential compatibility issues or security vulnerabilities from third-party packages.

- Documentation with clear examples 📚 - Comprehensive documentation with usage examples helps you get started quickly. Code snippets demonstrate common use cases and proper implementation.

- Cross-platform compatibility - works on Windows, Mac, Linux ðŸ’ŧ - Extensively tested across all major operating systems to guarantee consistent behavior regardless of platform. Deploy with confidence knowing it will work everywhere.

- Production-ready with semantic versioning ðŸ“Ķ - Following semantic versioning ensures API stability and makes dependency management predictable. Breaking changes are clearly communicated through version numbers.

- MIT licensed for maximum flexibility ⚖ïļ - The permissive MIT license allows usage in both commercial and open source projects with minimal restrictions. You can freely use, modify and distribute the code.

## Key Features

The library provides a focused set of powerful features:

- Simple, intuitive API that does one thing well ðŸŽŊ - A single function with clear purpose and behavior makes the library easy to learn and use effectively. No complicated configuration or setup required.

- Handles integers, floats and strings ðŸ”Ē - Flexible input handling accepts multiple numeric types including integers, floating point numbers, and their string representations. No need for manual type conversion.

- String parsing for numeric values ("7") 📝 - Intelligent string parsing converts numeric strings like "7" to their corresponding number for comparison. Handles leading/trailing whitespace and invalid formats gracefully.

- Direct equality comparison for numbers ðŸŽŊ - Performs exact numeric equality comparison accounting for type and value. No fuzzy matching or approximate comparisons that could produce incorrect results.

- Comprehensive test suite ensuring reliability ✅ - Extensive unit tests verify behavior across input types, edge cases, and error conditions. High test coverage gives confidence in library stability.

- Well-documented source code 📚 - Clean, documented implementation makes it easy to understand how the library works. Docstrings and comments explain the logic and design decisions.

## Installation

You can install `is_seven` using pip:

```bash
pip install is-seven
```

## Usage

Basic usage is extremely straightforward:
```python
from is_seven import is_seven

# Returns True
print(is_seven(7))
print(is_seven(7.0))
print(is_seven("7"))

# Returns False
print(is_seven(8))
print(is_seven(-7))
print(is_seven("eight"))
print(is_seven("7.1"))
print(is_seven(None))
```

## API Reference

### `is_seven(value)`

Returns `True` if the input is seven, `False` otherwise.

Parameters:
- `value`: The value to test. Can be:
  - Integer
  - Float
  - String (will attempt conversion)

Returns:
- `bool`: `True` if seven, `False` otherwise

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)

## FAQ

**Q: Why not just use `==`?**  
A: While `==` works for simple cases, `is_seven()` handles edge cases and provides semantic clarity to your code.

**Q: What's next for is_seven?**  
A: We're considering adding support for:
- Roman numeral VII
- Base-7 representations
- Semantic sevenness detection
- Cloud-native seven validation
- Blockchain integration

## Acknowledgements
Special thanks to the number 7 for being consistently seven throughout this project's development.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cwingho/is-seven",
    "name": "is-seven",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "seven, number, validation",
    "author": "Brian Chan",
    "author_email": "chanwingho94@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "# is-seven\n\nA simple yet powerful Python library that solves one of programming's most critical challenges: determining if a number is seven. \ud83d\udd22 This library provides a robust, production-ready solution for the common programming task of seven detection and validation.\n\n## Why is-seven?\n\nHave you ever needed to check if a number is exactly seven? \ud83e\udd14 Of course you have! While it may seem trivial to write `number == 7`, using a dedicated library brings several benefits: \u2728\n\nThe is-seven library offers numerous compelling advantages that make it the ideal choice for your seven-detection needs:\n\n- Professionally tested and maintained code with comprehensive unit tests \u2705 - Every release undergoes rigorous testing across multiple Python versions and platforms to ensure consistent behavior and reliability. Our test suite covers edge cases and validates core functionality.\n\n- Clear, semantic API that documents your intent and improves code readability \ud83d\udcda - The simple, expressive API makes code self-documenting. When other developers see `is_seven()` they immediately understand the validation being performed.\n\n- Handles edge cases like strings and floating point numbers \ud83c\udfaf - Beyond basic integer comparison, is-seven properly handles floating point precision, string parsing, and gracefully manages invalid inputs. No need to write your own type checking and conversion logic.\n\n- Zero dependencies - lightweight and reliable \ud83e\udeb6 - The library has absolutely no external dependencies, making it extremely lightweight and eliminating potential compatibility issues or security vulnerabilities from third-party packages.\n\n- Documentation with clear examples \ud83d\udcda - Comprehensive documentation with usage examples helps you get started quickly. Code snippets demonstrate common use cases and proper implementation.\n\n- Cross-platform compatibility - works on Windows, Mac, Linux \ud83d\udcbb - Extensively tested across all major operating systems to guarantee consistent behavior regardless of platform. Deploy with confidence knowing it will work everywhere.\n\n- Production-ready with semantic versioning \ud83d\udce6 - Following semantic versioning ensures API stability and makes dependency management predictable. Breaking changes are clearly communicated through version numbers.\n\n- MIT licensed for maximum flexibility \u2696\ufe0f - The permissive MIT license allows usage in both commercial and open source projects with minimal restrictions. You can freely use, modify and distribute the code.\n\n## Key Features\n\nThe library provides a focused set of powerful features:\n\n- Simple, intuitive API that does one thing well \ud83c\udfaf - A single function with clear purpose and behavior makes the library easy to learn and use effectively. No complicated configuration or setup required.\n\n- Handles integers, floats and strings \ud83d\udd22 - Flexible input handling accepts multiple numeric types including integers, floating point numbers, and their string representations. No need for manual type conversion.\n\n- String parsing for numeric values (\"7\") \ud83d\udcdd - Intelligent string parsing converts numeric strings like \"7\" to their corresponding number for comparison. Handles leading/trailing whitespace and invalid formats gracefully.\n\n- Direct equality comparison for numbers \ud83c\udfaf - Performs exact numeric equality comparison accounting for type and value. No fuzzy matching or approximate comparisons that could produce incorrect results.\n\n- Comprehensive test suite ensuring reliability \u2705 - Extensive unit tests verify behavior across input types, edge cases, and error conditions. High test coverage gives confidence in library stability.\n\n- Well-documented source code \ud83d\udcda - Clean, documented implementation makes it easy to understand how the library works. Docstrings and comments explain the logic and design decisions.\n\n## Installation\n\nYou can install `is_seven` using pip:\n\n```bash\npip install is-seven\n```\n\n## Usage\n\nBasic usage is extremely straightforward:\n```python\nfrom is_seven import is_seven\n\n# Returns True\nprint(is_seven(7))\nprint(is_seven(7.0))\nprint(is_seven(\"7\"))\n\n# Returns False\nprint(is_seven(8))\nprint(is_seven(-7))\nprint(is_seven(\"eight\"))\nprint(is_seven(\"7.1\"))\nprint(is_seven(None))\n```\n\n## API Reference\n\n### `is_seven(value)`\n\nReturns `True` if the input is seven, `False` otherwise.\n\nParameters:\n- `value`: The value to test. Can be:\n  - Integer\n  - Float\n  - String (will attempt conversion)\n\nReturns:\n- `bool`: `True` if seven, `False` otherwise\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## FAQ\n\n**Q: Why not just use `==`?**  \nA: While `==` works for simple cases, `is_seven()` handles edge cases and provides semantic clarity to your code.\n\n**Q: What's next for is_seven?**  \nA: We're considering adding support for:\n- Roman numeral VII\n- Base-7 representations\n- Semantic sevenness detection\n- Cloud-native seven validation\n- Blockchain integration\n\n## Acknowledgements\nSpecial thanks to the number 7 for being consistently seven throughout this project's development.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library to check if a number is seven",
    "version": "0.1.0",
    "project_urls": {
        "Bug Reports": "https://github.com/cwingho/is-seven/issues",
        "Homepage": "https://github.com/cwingho/is-seven",
        "Source": "https://github.com/cwingho/is-seven"
    },
    "split_keywords": [
        "seven",
        " number",
        " validation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afd017a0049da6ef80867064e093a54fb5d45bc7cd0515b08e9fd16906b3bd4c",
                "md5": "0600e263659a83477eb2dec0c6385d56",
                "sha256": "a51b52d81451f3fe353eaf4ca3406841d3d7a9fb79fa5d33c35901a9c0318de8"
            },
            "downloads": -1,
            "filename": "is_seven-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0600e263659a83477eb2dec0c6385d56",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5124,
            "upload_time": "2024-10-29T06:55:28",
            "upload_time_iso_8601": "2024-10-29T06:55:28.054775Z",
            "url": "https://files.pythonhosted.org/packages/af/d0/17a0049da6ef80867064e093a54fb5d45bc7cd0515b08e9fd16906b3bd4c/is_seven-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 06:55:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cwingho",
    "github_project": "is-seven",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "is-seven"
}
        
Elapsed time: 0.31652s