Skip to main content

sappears

This python library allows you to cound the ocurrences of a particular string python source files. This could used to estimate the effort of refactoring or changing a convention.

Why we do this?

There are times when you need to refactore some modules or replace a convention used during the implementation of a particular functionality. Measuring the impact of such changes is sometimes time consuming as it may involve going through all modules, classes and functions of your package.

How it works?

The goal of this search process is to have a table as follows:

Ocurrences as of [name of interest]:

| namespace    | type     | location                     | ocurrences |
|--------------|----------|------------------------------|------------|
| module_one   | module   | package/module_1/__init__.py | 2          |
| ClassOne     | type     | package/module_1/ClassOne.py | 1          |
| function_one | function | package/module_1/__init__.py | 1          |

You can achieve that by runing:

import mypackage # replace with the package you want to inspect.

import sappears

string = "import tensorflow as tf"

results = search_in_module(string, mypackage)
make_report(results)

where name of interest is the name of the variable, function, method, class or module you are interested in. Alternatively, you could just run it from the command line as follows:

python -m sappears [string of interest] [mypacakge]

Contribute

Please feel free to add issues and make PRs!

TODO

  • Specify searches by type (function, class, module, docstring).

Metadata

Release files for sappears 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sappears 0.0.2
File Size Uploaded Provenance Actions
sappears-0.0.2.tar.gz 1.9 kB Without provenance Details for sappears-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sappears 0.0.2
File Interpreter ABI Platform Actions
sappears-0.0.2-py3-none-any.whl Python 3 none any Details for sappears-0.0.2-py3-none-any.whl

Total release size: 4.7 kB

Release files / sappears-0.0.2.tar.gz

Download URL sappears-0.0.2.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
371c0fee0e68326dd745b6df76ed1067501e45b286e88ed150a084e5bffa5d2f
BLAKE2b-256 checksum
How to use checksums
71f04acbc117346146b60c694d60277edfe9c89fe38050ff24b81c42f4a3f988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Release files / sappears-0.0.2-py3-none-any.whl

Download URL sappears-0.0.2-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b5b26694b3ec80d98dd7ecb5d57c7053101176330b399a84b260db344b06628
BLAKE2b-256 checksum
How to use checksums
af2c8f0523d86d96dc718630ab5db1bc3f3609f0dea361c65706add940d57d3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Security for sappears 0.0.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page