bhavcopy


Namebhavcopy JSON
Version 3.0 PyPI version JSON
download
home_page
SummaryDownload NSE Bhavcopy Data
upload_time2023-07-29 14:16:36
maintainer
docs_urlNone
authorAjay
requires_python
licenseMIT
keywords bhavcopy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            bhavopy Python Package

This package provides a Python interface to download National Stock Exchange (NSE) bhavcopy data for Equities, Indices and Derivatives. The package provides functions to download daily bhavcopy data in CSV format, store the data in local storage, and update the data for any missing dates.

Basically it creates csv file for equities, indices and derivatives,
If the file already exist on assigned directory, then the code attempts to figure out missing dates and update the same file.
all you have to do is update the start and end date.

and all this can be done by simply providing following arguements:

pip install bhavcopy

import bhavcopy

# Place data need to be stored.

data_storage = "D:\\bhav_data"

# Define working directory, where files would be saved

os.chdir(data_storage)

# Define start and end dates, and convert them into date format

start_date = datetime.date(2023, 3, 1)

end_date = datetime.date(2023, 3, 21)

# Define wait time in seconds to avoid getting blocked

wait_time = [1, 2]

# Instantiate bhavcopy class for equities, indices, and derivatives

nse = bhavcopy("indices", start_date, end_date, data_storage, wait_time)

nse.get_data()

nse = bhavcopy("equities", start_date, end_date, data_storage, wait_time)

nse.get_data()

nse = bhavcopy("derivatives", start_date, end_date, data_storage, wait_time)

nse.get_data()


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "bhavcopy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Bhavcopy",
    "author": "Ajay",
    "author_email": "ajaydpawar@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/39/1d/50e67843584df397f9344f645fbdfd365794239ea0becd3a76e7f3cbf02a/bhavcopy-3.0.tar.gz",
    "platform": null,
    "description": "bhavopy Python Package\r\n\r\nThis package provides a Python interface to download National Stock Exchange (NSE) bhavcopy data for Equities, Indices and Derivatives. The package provides functions to download daily bhavcopy data in CSV format, store the data in local storage, and update the data for any missing dates.\r\n\r\nBasically it creates csv file for equities, indices and derivatives,\r\nIf the file already exist on assigned directory, then the code attempts to figure out missing dates and update the same file.\r\nall you have to do is update the start and end date.\r\n\r\nand all this can be done by simply providing following arguements:\r\n\r\npip install bhavcopy\r\n\r\nimport bhavcopy\r\n\r\n# Place data need to be stored.\r\n\r\ndata_storage = \"D:\\\\bhav_data\"\r\n\r\n# Define working directory, where files would be saved\r\n\r\nos.chdir(data_storage)\r\n\r\n# Define start and end dates, and convert them into date format\r\n\r\nstart_date = datetime.date(2023, 3, 1)\r\n\r\nend_date = datetime.date(2023, 3, 21)\r\n\r\n# Define wait time in seconds to avoid getting blocked\r\n\r\nwait_time = [1, 2]\r\n\r\n# Instantiate bhavcopy class for equities, indices, and derivatives\r\n\r\nnse = bhavcopy(\"indices\", start_date, end_date, data_storage, wait_time)\r\n\r\nnse.get_data()\r\n\r\nnse = bhavcopy(\"equities\", start_date, end_date, data_storage, wait_time)\r\n\r\nnse.get_data()\r\n\r\nnse = bhavcopy(\"derivatives\", start_date, end_date, data_storage, wait_time)\r\n\r\nnse.get_data()\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Download NSE Bhavcopy Data",
    "version": "3.0",
    "project_urls": null,
    "split_keywords": [
        "bhavcopy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "391d50e67843584df397f9344f645fbdfd365794239ea0becd3a76e7f3cbf02a",
                "md5": "af2953c0b06e868e4a6d049e95d114e2",
                "sha256": "1b071d97bc27baf834003d4f49d92dceeb5759a00419cfea0418b0dca99432a4"
            },
            "downloads": -1,
            "filename": "bhavcopy-3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "af2953c0b06e868e4a6d049e95d114e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4912,
            "upload_time": "2023-07-29T14:16:36",
            "upload_time_iso_8601": "2023-07-29T14:16:36.701250Z",
            "url": "https://files.pythonhosted.org/packages/39/1d/50e67843584df397f9344f645fbdfd365794239ea0becd3a76e7f3cbf02a/bhavcopy-3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-29 14:16:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "bhavcopy"
}
        
Elapsed time: 2.37574s