CountRecordRefs
CountRecordRefs is a command-line tool for counting related records in a MySQL database. The program outputs the number of records for each foreign key column.
The code is written in Python and should work with both Python 2 and 3.
Source repository: https://github.com/jmenglund/CountRecordRefs
Prerequisites
Apart from MySQL itself, you only need to have the Python package PyMySQL installed. If you install CountRecordRefs following the instructions below, PyMySQL will be installed automatically for you.
Installation
The project is hosted at https://github.com/jmenglund/CountRecordRefs and can be installed using git:
$ git clone https://github.com/jmenglund/CountRecordRefs.git
$ cd CountRecordRefs
$ python setup.py install
You may consider installing CountRecordRefs within a virtual environment in order to avoid cluttering your system’s Python path. See for example the environment management system conda or the package virtualenv.
This project is centered around a self-contained single-module (single-file) executable script that can also be used as such.
Usage
usage: CountRecordRefs.py [-h] [-V] [--user USER] [--password PASSWORD]
[--host HOST] [-z]
database_name table_name id
Command-line utility for counting related records in a MySQL database. Output
is written to <stdout>.
positional arguments:
database_name MySQL database name
table_name table name
id primary key value to look up
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
--user USER MySQL user (default: "root")
--password PASSWORD MySQL password
--host HOST database host (default: "localhost")
-z, --zero-counts include counts of zero in output
License
CountRecordRefs is distributed under the GNU General Public License, version 3 (GPL-3.0).
Metadata
Release files for CountRecordRefs 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| CountRecordRefs-0.2.1.tar.gz | 17.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| CountRecordRefs-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.2 kB
Release files / CountRecordRefs-0.2.1.tar.gz
| Download URL | CountRecordRefs-0.2.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd1b902d06ae0b1186a2a314e984702e08c7bb94bdfb3ec67be0a17ed4c0c482
|
|
BLAKE2b-256 checksum How to use checksums |
36fc341e50c673f8fa32a65cf4194c9cb6ad8a569280ba4c5bad938cd1e90daa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / CountRecordRefs-0.2.1-py3-none-any.whl
| Download URL | CountRecordRefs-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6901102fe692e2f44985b14a7d226d1bc3087d76938838a82288a54de7a8bf10
|
|
BLAKE2b-256 checksum How to use checksums |
cdaca2088c56fb03fb4aff1a5a326c3684d2e602817ed12d09cbc46bd49253df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for CountRecordRefs 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.