rand-sn


Namerand-sn JSON
Version 1.0.0 PyPI version JSON
download
home_page
Summaryrand-sn is a versatile Python tool designed for generating randomized serial numbers along with their corresponding barcodes and QR codes, facilitating secure labeling, efficient scanning, and enhanced inventory management while preserving operational confidentiality.
upload_time2024-03-03 00:55:51
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Peter JOHN Matecsa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords barcode qr code inventory-management serial-numbers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Project Name
# rand-sn - Random Serial Number Generator

## Description

This Python tool generates serial numbers, corresponding barcodes, and QR codes, making it ideal for secure labelling and easy scanning. It allows you to assign serial numbers to batches of physical objects, enhancing inventory management and product tracking. A standout feature of this tool is its ability to randomize the order of serial numbers, effectively masking the total quantity of items produced. The program is handy for maintaining operational confidentiality by preventing estimates of production volumes. For a closer look at the tool's capabilities, please refer to our output [samples](samples).
- The program uses a config file to resume where the last batch ended.
- Each batch is stored in a sequentially numbered subdirectory.
- The file serial-numbers.json contains a list of all in the batch. Many tools can import .json files.
- Bar files are rectangular barcode images. These are best when space is limited.
- QR files are square QR code images. If you want to create a dedicated web page for each object, you can embed a URL starter in the QR code. They can take the place of a printed manual.
- You can resize the images to match the DPI of your printer and the expected scanner resolution.

## Installation
Instructions on how to install and configure the project are incomplete; you can do the following for now:
1. Install the current stable version of [Python](https://www.python.org). 
2. At the command line or terminal prompt, enter.
```bash
pip install rand-sn
```

## Upgrade
At the command line or terminal prompt, enter.
```bash
pip install --upgrade rand-sn
```

## Usage
A guide on how to use the project.

### Configuration

Begin by deciding how you want serial numbers to be. For each config file, do this once and only once. The command-line options are as follows:
- `-s` or `--smallest`: The lowest possible serial number. The default 1. 
- `-b` or `--biggest`: The highest possible serial number. There is no default.
- `-p` or `--prefix`: A prefix added to the start of every QR code. None is the default.
- `-c` or `--config`: The optional config file's name.

Sample command:
```rand-sn -b 9999 -p https://your-domain.com/serial-number/```

### Batching
After configuring, generate a new batch of serial numbers every time you need one. The command-line options are as follows:
- `-n` or `--number`: You need serial numbers in the new batch. There is no default.
- `-c` or `--config`:  The optional config file's name.

Sample command:
```rand-sn -n 10```

## Backup and Restore

Back up after each batch or use an automated backup solution; highly recommended

The config file (code-QR-generator-config.json by default) determines the following serial numbers and is crucial for the tool to function correctly. Make sure to back it up regularly.

To recover, reinstall the program and restore the config file to its working directory.

### FAQ

---

**Q:** When I run rand-sn my operating system says something like command not found.

**A:** Try this alternative.
        ```
        python3 -m rand-sn
        ```
---

**Q:** Can I configure and generate batches at the same time?

**A:** Configuration and batch generation are two separate processes. Initially, you must configure the system once for your setup. After configuration, you can generate batches of serial numbers as needed. This approach ensures that each batch adheres to the predefined configuration, maintaining consistency across your serial numbers.

---

**Q:** Can I edit my config file if I change my mind about the configuration settings?

**A:** You can safely edit the QR code prefix directly within your configuration file. For other settings, particularly those affecting the range and format of serial numbers, it's recommended to create a new configuration file to avoid inconsistencies or conflicts with previously generated batches.

---

**Q:** How can I manage multiple products?

**A:** For handling multiple products, utilize the `-c` or `--config` option to create and specify a unique configuration file for each product. This method allows you to maintain distinct settings for each product line, ensuring that each product's identifiers are specific and organized.

---

**Q:** How do I avoid leading zeros in serial numbers?

**A1:** To prevent leading zeros, carefully set the `-s` (smallest) and `-b` (biggest) options to define the range of your serial numbers. Adjust the range according to the total number of serial numbers you anticipate needing. For instance, if you expect to require up to 5000 serial numbers, you might set your range from 1000 to 9999, giving you ample space for expansion.

**A2:** For those utilizing barcodes, please refer to the following question for additional guidance.

---

**Q:** Why do all my barcodes start with a zero?

**A:** Barcodes encode numbers in pairs. Use an even number of digits in your serial numbers to avoid the automatic leading zero.

---

**Q:** During manual entry, how can I detect data entry errors?

**A1:** See earlier about avoiding leading zeros. Verify the length of each entered number.

**A2:** Maintain a database of all generated serial numbers. Use it to do real-time validation.

**A3:** Currently, the system does not offer an option to include a check digit in serial numbers. Incorporating a check digit can significantly reduce data entry errors by allowing for immediate validation of each serial number's correctness.

---

**Q:** Will the system alert me if I've exhausted all possible serial numbers?

**A:** Yes, batch generation will abort when the potential for generating new, unique serial numbers within the configured range is exhausted. Planning your serial number ranges and configurations with future needs is essential.

---

## License

This project is distributed under the [MIT License](LICENSE.txt).

## Contact

If you find room for improvement or need to ask a question, open a new [issue](https://github.com/matecsaj/rand_sn/issues). 

If you are a Python programmer or a writer and want to contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).

For inquiries, please contact: Peter JOHN Matecsa
matecsaj@gmail.com

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "rand-sn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "barcode,QR code,inventory-management,serial-numbers",
    "author": "",
    "author_email": "Peter JOHN Matecsa <matecsaj@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/38/72/97c798d63735598d02507f5af9d2f23fddaacaac140ba81cb35771269318/rand-sn-1.0.0.tar.gz",
    "platform": null,
    "description": "# Project Name\n# rand-sn - Random Serial Number Generator\n\n## Description\n\nThis Python tool generates serial numbers, corresponding barcodes, and QR codes, making it ideal for secure labelling and easy scanning. It allows you to assign serial numbers to batches of physical objects, enhancing inventory management and product tracking. A standout feature of this tool is its ability to randomize the order of serial numbers, effectively masking the total quantity of items produced. The program is handy for maintaining operational confidentiality by preventing estimates of production volumes. For a closer look at the tool's capabilities, please refer to our output [samples](samples).\n- The program uses a config file to resume where the last batch ended.\n- Each batch is stored in a sequentially numbered subdirectory.\n- The file serial-numbers.json contains a list of all in the batch. Many tools can import .json files.\n- Bar files are rectangular barcode images. These are best when space is limited.\n- QR files are square QR code images. If you want to create a dedicated web page for each object, you can embed a URL starter in the QR code. They can take the place of a printed manual.\n- You can resize the images to match the DPI of your printer and the expected scanner resolution.\n\n## Installation\nInstructions on how to install and configure the project are incomplete; you can do the following for now:\n1. Install the current stable version of [Python](https://www.python.org). \n2. At the command line or terminal prompt, enter.\n```bash\npip install rand-sn\n```\n\n## Upgrade\nAt the command line or terminal prompt, enter.\n```bash\npip install --upgrade rand-sn\n```\n\n## Usage\nA guide on how to use the project.\n\n### Configuration\n\nBegin by deciding how you want serial numbers to be. For each config file, do this once and only once. The command-line options are as follows:\n- `-s` or `--smallest`: The lowest possible serial number. The default 1. \n- `-b` or `--biggest`: The highest possible serial number. There is no default.\n- `-p` or `--prefix`: A prefix added to the start of every QR code. None is the default.\n- `-c` or `--config`: The optional config file's name.\n\nSample command:\n```rand-sn -b 9999 -p https://your-domain.com/serial-number/```\n\n### Batching\nAfter configuring, generate a new batch of serial numbers every time you need one. The command-line options are as follows:\n- `-n` or `--number`: You need serial numbers in the new batch. There is no default.\n- `-c` or `--config`:  The optional config file's name.\n\nSample command:\n```rand-sn -n 10```\n\n## Backup and Restore\n\nBack up after each batch or use an automated backup solution; highly recommended\n\nThe config file (code-QR-generator-config.json by default) determines the following serial numbers and is crucial for the tool to function correctly. Make sure to back it up regularly.\n\nTo recover, reinstall the program and restore the config file to its working directory.\n\n### FAQ\n\n---\n\n**Q:** When I run rand-sn my operating system says something like command not found.\n\n**A:** Try this alternative.\n        ```\n        python3 -m rand-sn\n        ```\n---\n\n**Q:** Can I configure and generate batches at the same time?\n\n**A:** Configuration and batch generation are two separate processes. Initially, you must configure the system once for your setup. After configuration, you can generate batches of serial numbers as needed. This approach ensures that each batch adheres to the predefined configuration, maintaining consistency across your serial numbers.\n\n---\n\n**Q:** Can I edit my config file if I change my mind about the configuration settings?\n\n**A:** You can safely edit the QR code prefix directly within your configuration file. For other settings, particularly those affecting the range and format of serial numbers, it's recommended to create a new configuration file to avoid inconsistencies or conflicts with previously generated batches.\n\n---\n\n**Q:** How can I manage multiple products?\n\n**A:** For handling multiple products, utilize the `-c` or `--config` option to create and specify a unique configuration file for each product. This method allows you to maintain distinct settings for each product line, ensuring that each product's identifiers are specific and organized.\n\n---\n\n**Q:** How do I avoid leading zeros in serial numbers?\n\n**A1:** To prevent leading zeros, carefully set the `-s` (smallest) and `-b` (biggest) options to define the range of your serial numbers. Adjust the range according to the total number of serial numbers you anticipate needing. For instance, if you expect to require up to 5000 serial numbers, you might set your range from 1000 to 9999, giving you ample space for expansion.\n\n**A2:** For those utilizing barcodes, please refer to the following question for additional guidance.\n\n---\n\n**Q:** Why do all my barcodes start with a zero?\n\n**A:** Barcodes encode numbers in pairs. Use an even number of digits in your serial numbers to avoid the automatic leading zero.\n\n---\n\n**Q:** During manual entry, how can I detect data entry errors?\n\n**A1:** See earlier about avoiding leading zeros. Verify the length of each entered number.\n\n**A2:** Maintain a database of all generated serial numbers. Use it to do real-time validation.\n\n**A3:** Currently, the system does not offer an option to include a check digit in serial numbers. Incorporating a check digit can significantly reduce data entry errors by allowing for immediate validation of each serial number's correctness.\n\n---\n\n**Q:** Will the system alert me if I've exhausted all possible serial numbers?\n\n**A:** Yes, batch generation will abort when the potential for generating new, unique serial numbers within the configured range is exhausted. Planning your serial number ranges and configurations with future needs is essential.\n\n---\n\n## License\n\nThis project is distributed under the [MIT License](LICENSE.txt).\n\n## Contact\n\nIf you find room for improvement or need to ask a question, open a new [issue](https://github.com/matecsaj/rand_sn/issues). \n\nIf you are a Python programmer or a writer and want to contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\nFor inquiries, please contact: Peter JOHN Matecsa\nmatecsaj@gmail.com\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Peter JOHN Matecsa  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "rand-sn is a versatile Python tool designed for generating randomized serial numbers along with their corresponding barcodes and QR codes, facilitating secure labeling, efficient scanning, and enhanced inventory management while preserving operational confidentiality.",
    "version": "1.0.0",
    "project_urls": {
        "homepage": "https://github.com/matecsaj/rand_sn",
        "issues": "https://github.com/matecsaj/rand_sn/issues",
        "repository": "https://github.com/matecsaj/rand_sn"
    },
    "split_keywords": [
        "barcode",
        "qr code",
        "inventory-management",
        "serial-numbers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5ee8ccd5c8f2d05157e3d7f6148294e6d6ec39a15fc863182b108780cfaf9d8",
                "md5": "51f86a2741a99a4e6a5cff6092886ced",
                "sha256": "99bf4deafae1cb012dea44262f45a1af1d43b6558186d50b57c7c87c77553504"
            },
            "downloads": -1,
            "filename": "rand_sn-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51f86a2741a99a4e6a5cff6092886ced",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14787,
            "upload_time": "2024-03-03T00:55:48",
            "upload_time_iso_8601": "2024-03-03T00:55:48.817267Z",
            "url": "https://files.pythonhosted.org/packages/c5/ee/8ccd5c8f2d05157e3d7f6148294e6d6ec39a15fc863182b108780cfaf9d8/rand_sn-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "387297c798d63735598d02507f5af9d2f23fddaacaac140ba81cb35771269318",
                "md5": "54c0d2d4fd1899f0b1fd93f120d7925a",
                "sha256": "343419fc94d13a20d8cfee777bde37a1a05af9b6daa369c4ef08c4ea0d888248"
            },
            "downloads": -1,
            "filename": "rand-sn-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "54c0d2d4fd1899f0b1fd93f120d7925a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17457,
            "upload_time": "2024-03-03T00:55:51",
            "upload_time_iso_8601": "2024-03-03T00:55:51.106207Z",
            "url": "https://files.pythonhosted.org/packages/38/72/97c798d63735598d02507f5af9d2f23fddaacaac140ba81cb35771269318/rand-sn-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-03 00:55:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "matecsaj",
    "github_project": "rand_sn",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rand-sn"
}
        
Elapsed time: 2.23455s