-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Package divided into BSE.py and constants.py
- New methods added: BSE.bhavcopyReport BSE.deliveryReport BSE.resultCalendar BSE.gainers BSE.losers BSE.quoteWeeklyHL - BSE.allAnnouncements and BSE.announcements merged into BSE.announcements - BSE.allCorporateActions and BSE.corporateActions merged into BSE.actions - BSE.scripMeta dropped in favor of BSE.listSecurities - BSE.announcements now returns a single page of announcements. - User agent updated - Added detailed documentation with sphinx
- Loading branch information
1 parent
ce2b2a8
commit 33d73f4
Showing
28 changed files
with
1,397 additions
and
21,893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
furo==2023.9.10 | ||
bse>=0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Constants | ||
--------- | ||
|
||
.. autoclass:: bse.constants.CATEGORY | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.SEGMENT | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.STATUS | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.INDEX | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.PURPOSE | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.SECTOR | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.SECTOR_ISIN | ||
:members: | ||
:undoc-members: | ||
|
||
.. autoclass:: bse.constants.INDUSTRY | ||
:members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
src = Path(__file__).parents[2].resolve() / 'src' | ||
|
||
sys.path.insert(0, src.as_posix()) | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'bse' | ||
copyright = '2023, Benny Thadikaran' | ||
author = 'Benny Thadikaran' | ||
release = '1.0.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'furo' | ||
html_static_path = ['_static'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. bse documentation master file, created by | ||
sphinx-quickstart on Mon Oct 23 12:04:38 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to BSE's documentation! | ||
======================================= | ||
|
||
**BSE** is an Unofficial Python Api for BSE India stock exchange | ||
|
||
Python version: >= 3.10 | ||
|
||
All network requests through BSE are rate limited or throttled. This allows making large number of requests without overloading the server or getting blocked. | ||
|
||
GitHub Source: `BennyThadikaran/BseIndiaApi <https://github.com/BennyThadikaran/BseIndiaApi>`_ | ||
|
||
Contents | ||
-------- | ||
|
||
.. toctree:: | ||
|
||
usage | ||
Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
===== | ||
Usage | ||
===== | ||
|
||
Installation | ||
------------ | ||
|
||
To use ``bse``, first install it using pip: | ||
|
||
.. code:: console | ||
$ pip install bse | ||
Example | ||
------- | ||
|
||
.. code-block:: python | ||
from bse import BSE | ||
bse = BSE() | ||
bse.exit() # close requests session | ||
.. code-block:: python | ||
:caption: Using 'with' statement | ||
with BSE() as bse: | ||
pass | ||
API | ||
___ | ||
|
||
General Methods | ||
--------------- | ||
|
||
.. automethod:: bse.BSE.exit | ||
|
||
.. automethod:: bse.BSE.getScripName | ||
|
||
.. automethod:: bse.BSE.getScripCode | ||
|
||
Download Reports | ||
---------------- | ||
.. automethod:: bse.BSE.bhavcopyReport | ||
|
||
.. automethod:: bse.BSE.deliveryReport | ||
|
||
Corporate Filings | ||
----------------- | ||
|
||
.. automethod:: bse.BSE.announcements | ||
|
||
.. automethod:: bse.BSE.actions | ||
|
||
.. automethod:: bse.BSE.resultCalendar | ||
|
||
Market Updates and Summary | ||
-------------------------- | ||
|
||
.. automethod:: bse.BSE.gainers | ||
|
||
.. automethod:: bse.BSE.losers | ||
|
||
.. automethod:: bse.BSE.near52WeekHighLow | ||
|
||
.. automethod:: bse.BSE.quote | ||
|
||
.. automethod:: bse.BSE.quoteWeeklyHL | ||
|
||
.. automethod:: bse.BSE.listSecurities |
Oops, something went wrong.