Skip to main content

No project description provided

Project description

Verbs in func names counter

This script calculate verbs count in func names in .py files.
Script check all folders recursively. Default folder names for search:
django, flask, pyramid, reddit, requests, sqlalchemy.
You can add your folders to check list.

How to install

Run pip3 install verb-counter
Run on CLI for update nltk if it need:
$ python3
>> import nltk
>> nltk.download('all')

How to use

If you want check default folders:
$ verbs
If you want add your project folders, print it space-separated:
$ verbs -p myproject1 myproject2
If you want check all funcs names:
verbs -a

Usage example:

We have some folders structure with dclint.py:

├── dclint.py
├── django
│   ├── css
│   ├── bootstrap.min.css
│   ├── my_app.py
│
├── flask
│   ├── favicon.ico
│   ├── polls.py
│   ├── garbage_files
│   │   ├──bootstrap.min.js
│   │   ├──html5shiv.min.js
│   │   ├──thrash.py
│
├── myproject
│   ├──ie-emulation-modes-warning.js
│   ├──old_version.py
│   ├──new_file.py
In all folders - 5 .py files.
All files have funcs like this (for example):
def get_all_names(names):
    for name in names:
        print('name: {name}'.format(name=name))
def give_money(user, money):
    print('{user} now have {money} $'.format(user=user,
     money=money))
def check_exist(folder):
    if os.path.exist(folder):
        return True

And another funcs.

Folders flask and django already in check list, but we need add myproject.
Run check:
$ verbs -p myproject
Result:
dirpath: ./myproject:
total ".py" files count: 1
verb "get" count: 1
------------
dirpath: ./django:
total ".py" files count: 3
verb "get" count: 3
verb "give" count: 2
------------
dirpath: ./flask:
total ".py" files count: 1
verb "get" count: 1
------------
total verbs: 4
unique verbs: 2
"get" in 3 projects
"give" in 1 projects

License

MIT license

Project details


Release history Release notifications | RSS feed

This version

1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verb_counter-1.2.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file verb_counter-1.2.tar.gz.

File metadata

  • Download URL: verb_counter-1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for verb_counter-1.2.tar.gz
Algorithm Hash digest
SHA256 6b93112a6922ed232dd03b02bc35c57c30f7351216f64f074a2c174330d4115e
MD5 d7d4ef065c3afaf7061773bbc2107121
BLAKE2b-256 fd12ed310c23e78121fb3c81c55b0b1d35cc023cdea3799b24cab516abad2c28

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page