{"id":16391228,"url":"https://github.com/gjjvdburg/ffcount","last_synced_at":"2025-07-25T21:04:17.104Z","repository":{"id":30972155,"uuid":"126539429","full_name":"GjjvdBurg/ffcount","owner":"GjjvdBurg","description":"Fast File and Directory Counting in Python","archived":false,"fork":false,"pushed_at":"2023-10-09T21:52:27.000Z","size":84,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-14T12:37:16.852Z","etag":null,"topics":["dir-count","file-count","python","recursive"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GjjvdBurg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-03-23T21:12:59.000Z","updated_at":"2024-07-02T20:16:52.000Z","dependencies_parsed_at":"2023-02-10T06:46:12.552Z","dependency_job_id":"e0f5c1f4-7065-4cb8-a5b8-fd952d13cfb4","html_url":"https://github.com/GjjvdBurg/ffcount","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":"0.11250000000000004","last_synced_commit":"667cc2cc84cccfc91daf692107196209c8abbb31"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Fffcount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Fffcount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Fffcount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GjjvdBurg%2Fffcount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GjjvdBurg","download_url":"https://codeload.github.com/GjjvdBurg/ffcount/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811384,"owners_count":16884305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dir-count","file-count","python","recursive"],"created_at":"2024-10-11T04:45:25.643Z","updated_at":"2024-10-28T09:10:29.042Z","avatar_url":"https://github.com/GjjvdBurg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast File Count in Python\n\n[![build](https://github.com/GjjvdBurg/ffcount/workflows/build/badge.svg)](https://github.com/GjjvdBurg/ffcount/actions?query=workflow%3Abuild)\n[![PyPI version](https://badge.fury.io/py/ffcount.svg)](https://pypi.org/project/ffcount)\n[![Python package downloads](https://pepy.tech/badge/ffcount)](https://pepy.tech/project/ffcount)\n\nThis is a Python package to quickly count the number of files and directories\nin a given path. Optionally you can count recursively and include hidden files\nin the total.\n\nThis package is a wrapper around ``fast-file-count`` by [Christopher Schultz\n](https://github.com/ChristopherSchultz). Credit for the initial version \nbelongs to Christopher Schultz, I wrote the Python wrapper, converted the \nWindows code to use builtin functionality, and packaged it up.  See the file\n``src/c_count.c`` for the other contributors and see the commit history of\nthis package on GitHub for my exact changes.\n\n## Installation\n\nInstallation can be done easily with pip:\n\n```bash\n$ pip install ffcount\n```\n\n## Usage\n\nThere is a command line application called ``ffcount``, which recursively \ncounts files and directories:\n\n```\n$ ffcount\n```\n\nSee ``ffcount -h`` for options.\n\nThe package can also be used as a Python library, using the ``ffcount`` \nfunction. This function returns a tuple ``(number_of_files, number_of_dirs)`` \nand it can be used as follows:\n\n```python\n\u003e\u003e\u003e from ffcount import ffcount\n\n# count everything under the current path\n\u003e\u003e\u003e ffcount()\n(521013, 43012)\n\n# count without hidden files\n\u003e\u003e\u003e ffcount(hidden=False)\n(234012, 12082)\n\n# use a different path\n\u003e\u003e\u003e ffcount('/tmp')\n(81, 10)\n```\n\nNote that ``ffcount`` counts links as files, even if they point to a \ndirectory. In some cases, this explains the discrepancy with other ways of \ncounting.\n\nTo obtain the full function documentation, simply run:\n\n```python\n\u003e\u003e\u003e import ffcount\n\u003e\u003e\u003e help(ffcount)\n```\n\n## License\n\nThe original C code by Christopher Schultz was licensed under the Apache\nLicense 2.0. This package is therefore licensed under this license as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjjvdburg%2Fffcount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjjvdburg%2Fffcount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjjvdburg%2Fffcount/lists"}