{"id":13501469,"url":"https://github.com/cadu-leite/networkdays","last_synced_at":"2025-06-22T06:36:46.983Z","repository":{"id":40709051,"uuid":"270298470","full_name":"cadu-leite/networkdays","owner":"cadu-leite","description":"Networkdays functions ...  including `networkdays` excel like function with no dependencies (no NumPy)","archived":false,"fork":false,"pushed_at":"2023-09-01T03:47:55.000Z","size":63,"stargazers_count":28,"open_issues_count":10,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T05:37:54.687Z","etag":null,"topics":["bussiness","calendar","dates","events","networkdays","scheduler"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadu-leite.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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,"roadmap":null,"authors":"AUTHORS.rst"}},"created_at":"2020-06-07T12:23:58.000Z","updated_at":"2025-01-18T11:40:53.000Z","dependencies_parsed_at":"2024-01-16T10:36:31.375Z","dependency_job_id":"7c3e0541-d106-4a49-ab2a-de4e57f03bae","html_url":"https://github.com/cadu-leite/networkdays","commit_stats":{"total_commits":46,"total_committers":5,"mean_commits":9.2,"dds":0.5869565217391304,"last_synced_commit":"170558af3d8f05015fc9bf87147a3b0fb2b2cc4d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cadu-leite/networkdays","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fnetworkdays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fnetworkdays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fnetworkdays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fnetworkdays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadu-leite","download_url":"https://codeload.github.com/cadu-leite/networkdays/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fnetworkdays/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261249371,"owners_count":23130493,"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":["bussiness","calendar","dates","events","networkdays","scheduler"],"created_at":"2024-07-31T22:01:38.646Z","updated_at":"2025-06-22T06:36:46.923Z","avatar_url":"https://github.com/cadu-leite.png","language":"Python","readme":"***********\nNetworkdays\n***********\n\nsome statistics ...\n\n+------------------------+----------------------+--------------------+---------------------+\n| Pypi Version           | Doc Status           | Coverage           | Downloads           |\n+========================+======================+====================+=====================+\n|  |badge_pypi_version|  |  |badge_doc_status|  |  |badge_coverage|  |  |badge_downloads|  |\n+------------------------+----------------------+--------------------+---------------------+\n\n\n.. |badge_pypi_version| image:: https://img.shields.io/pypi/v/python-networkdays.svg?style=flat-square\n    :target: https://pypi.org/project/python-networkdays\n    :alt: pypi version\n\n\n.. |badge_doc_status| image:: https://readthedocs.org/projects/networkdays/badge/?version=latest\n    :target: https://networkdays.readthedocs.io/?badge=latest\n    :alt: Documentation Status\n\n\n.. |badge_coverage| image:: https://codecov.io/gh/cadu-leite/networkdays/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/cadu-leite/networkdays\n    :alt: code coverage\n\n\n.. |badge_downloads| image:: https://img.shields.io/pypi/dm/wagtail-seo\n    :target: https://pypi.org/project/python-networkdays\n    :alt: Downloads on Pypi\n\n\n-------------------------------------------\n\n\n- Business days calendar.\n- JobSchedule on business days.\n\n.. tip::\n\n    **Just Python built-in libs, no dependencies**\n\n\nNetworkdays:\n    Return working days between two dates exclude weekends and holidays.\n\n    - just like spreadsheets `networdays` function\n    - exclude Holidays\n    - Exclude \"days off\" per week.\n\n\nJob schedule:\n    Calculate the period for a given job hours, based on `Networdays`.\n\n\n.. contents:: Table of Contents\n\n\nInstallation\n============\n\npython-networkdays can be installed from PyPI using pip\n\n.. code-block:: bash\n\n    pip install python-networkdays\n\n.. tip:: note that the package name is different from the importable name\n\nPage on Pypi: https://pypi.org/project/python-networkdays/\n\nThere is no dependencies.\n\n\nFeatures\n========\n\n- Return a list of business days between 2 dates.\n- Exclude weekends by default\n- Custom \"days off\" may be informed as list like {1,2,3,4,5,6,7}, where 1 is Monday default is {6,7} = (Sat, Sun).\n- How many business days between two dates.\n- How many days off, including holidays and weekends.\n- Return a list of business days for a given number of hours\n- Return a list of Years, months or weeks for a given number of hours\n- **No Pandas or NumPy dependencies**\n\n\nExamples\n========\n\nClass Networkdays.networkdays\n-----------------------------\n\nList business days, weekends and Holidays\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n.. code-block:: python\n    \n    In [1]: from networkdays import networkdays\n\n    In [2]: import datetime\n\n    In [3]: HOLIDAYS = { datetime.date(2020, 12, 25) }  # define a Holidays list\n\n    # initiate  class::`networkdays.Networkdays` \n    In [4]: days = networkdays.Networkdays(\n                datetime.date(2020, 12, 15),  # start date\n                datetime.date(2020, 12, 31),  # end date\n                HOLIDAYS  # list of Holidays\n            )\n\n    In [5]: days.networkdays()  # return a list os workdays \n    Out[5]:\n    [datetime.date(2020, 12, 15),\n     datetime.date(2020, 12, 16),\n     datetime.date(2020, 12, 17),\n     datetime.date(2020, 12, 18),\n     datetime.date(2020, 12, 21),\n     datetime.date(2020, 12, 22),\n     datetime.date(2020, 12, 23),\n     datetime.date(2020, 12, 24),\n     datetime.date(2020, 12, 28),\n     datetime.date(2020, 12, 29),\n     datetime.date(2020, 12, 30),\n     datetime.date(2020, 12, 31)]\n\n    In [6]: days.weekends()  # list os Weekends (default = Saturday ans Sunday) \n    Out[6]:\n    [datetime.date(2020, 12, 19),\n     datetime.date(2020, 12, 20),\n     datetime.date(2020, 12, 26),\n     datetime.date(2020, 12, 27)]\n\n    In [7]: days.holidays()\n    Out[7]: [datetime.date(2020, 12, 25)] # list of holidays \n\n\nclass Networkdays.jobschedule\n-----------------------------\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from networkdays import networkdays\n    \u003e\u003e\u003e import datetime\n    \u003e\u003e\u003e # Distribute the 600 hrs of effort, starting on december 1, 2020 working 8hrs per day.\n    \u003e\u003e\u003e jobschedule = networkdays.JobSchedule(600, 8, datetime.date(2020, 12, 1), networkdays=None)\n    \u003e\u003e\u003e job_dates = jobschedule.job_workdays()\n    \u003e\u003e\u003e jobschedule.bussines_days\n    54\n    \u003e\u003e\u003e jobschedule.total_days\n    datetime.timedelta(days=73)\n    \u003e\u003e\u003e jobschedule.prj_starts\n    '12/01/20'\n    \u003e\u003e\u003e jobschedule.prj_ends\n    '02/12/21'\n    \u003e\u003e\u003e list(jobschedule.years())\n    [2020, 2021]\n    \u003e\u003e\u003e list(jobschedule.months())\n    [12, 1, 2]\n    \u003e\u003e\u003e list(jobschedule.weeks()) # ISO\n    [49, 50, 51, 52, 53, 1, 2, 3, 4, 5, 6]\n    \u003e\u003e\u003e f'days: {list(jobschedule.days())[:2]} ... {list(jobschedule.days())[-2:]}'\n    'days: [datetime.date(2020, 12, 1), datetime.date(2020, 12, 2)] ... [datetime.date(2021, 2, 11), datetime.date(2021, 2, 12)]'\n\n\nOther similar projects\n======================\n\nWhen I start to code, I did check for some similar projects.\n\nI knew about `python-dateutil \u003chttps://github.com/dateutil/dateutil\u003e`_, a great project I use for years...\nI'd like something more straightforward or simpler.\n\nAfter to publish the python-networkdays on PyPi\nI found some others  8(\n\n- workdays_ : A 5 years old project, looks the same as networkdays_\n- timeboard_ : A more complex but powerful project\n- python-dateutil_ is great, powerful but even more complex.\n- python-bizdays_ : Quick simple and direct ...\n\n.. _workdays: https://pypi.org/project/workdays/\n.. _timeboard: https://github.com/mmamaev/timeboard\n.. _python-dateutil: https://github.com/dateutil/dateutil\n.. _python-bizdays: https://github.com/wilsonfreitas/python-bizdays\n\nI will try to keep this list updated...\n\n\nMore on ..  \n\nhttps://networkdays.readthedocs.io/index.html\n\nhttps://libraries.io/pypi/python-networkdays/sourcerank\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadu-leite%2Fnetworkdays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadu-leite%2Fnetworkdays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadu-leite%2Fnetworkdays/lists"}