1- Bloomberg Python API
2- ====================
1+ # Bloomberg Python API
32
43This directory contains an interface for interacting with Bloomberg API
54services using the Python programming language. This package is the source
@@ -9,8 +8,7 @@ Python's `setuptools` package.
98Users are encouraged to install using ` pip ` directly, as documented in
109< https://www.bloomberg.com/professional/support/api-library >
1110
12- Dependencies
13- ------------
11+ ## Dependencies
1412
1513This SDK requires the following products:
1614
@@ -29,15 +27,9 @@ unsupported versions of CPython.
2927
3028On Windows, the VS redistributable package for the compiler used in the target
3129CPython installation is needed. You can find the compiler version for a
32- CPython version in [1] and the VC redistributable package in [2] .
30+ CPython version [ here ] ( https://wiki.python.org/moin/WindowsCompilers ) and the VC redistributable package [ here ] ( https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads ) .
3331
34- [1] https://wiki.python.org/moin/WindowsCompilers
35-
36- [2] https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
37-
38-
39- Installation from sources
40- -------------------------
32+ ## Installation from sources
4133
4234Installation using pip is strongly recommended, and can handle installing from
4335sources by building the Python SDK binaries locally. The C++ SDK and setting
@@ -57,20 +49,26 @@ distributed as part of the Bloomberg C++ SDK.
5749
58502 . To compile and install the ` blpapi ` Python package for all users, run
5951
60- > python setup.py install
52+ ``` bash
53+ > python setup.py install
54+ ```
6155
6256 To compile and install the ` blpapi` Python package for only the current
6357 user, run
6458
65- > python setup.py install --user
59+ ` ` ` bash
60+ > python setup.py install --user
61+ ` ` `
6662
6763 (Note that the former command requires root/administrator access, while the
6864 latter does not.)
6965
7066 Documentation on additional build and installation options is available by
7167 running
7268
73- > python setup.py --help
69+ ` ` ` bash
70+ > python setup.py --help
71+ ` ` `
7472
75733. (optional) Copy the C++ SDK shared library/DLL to a standard library
7674 location (e.g. ` /usr/lib` on Linux), or update the system-wide library path
@@ -82,8 +80,7 @@ distributed as part of the Bloomberg C++ SDK.
8280 installed.
8381
8482
85- Writing Bloomberg API Programs in Python
86- ----------------------------------------
83+ # # Writing Bloomberg API Programs in Python
8784
8885In order for python scripts to call Bloomberg API functions, the libraries
8986distributed as part of the Bloomberg C++ SDK must be available to the Python
@@ -99,12 +96,14 @@ these libraries in their `PATH`.)
9996After installation, the ` blpapi` module can be imported by a Python script or
10097within the CPython interpreter:
10198
102- >>> import blpapi
103- >>> options = blpapi.SessionOptions()
104- >>> options.setServerHost('localhost')
105- >>> options.setServerPort(8194)
106- >>> session = blpapi.Session(options)
107- >>> session.start()
99+ ` ` ` python
100+ >>> import blpapi
101+ >>> options = blpapi.SessionOptions ()
102+ >>> options.setServerHost(' localhost' )
103+ >>> options.setServerPort(8194)
104+ >>> session = blpapi.Session(options)
105+ >>> session.start ()
106+ ` ` `
108107
109108Note that many Python installations add the current directory to the module
110109search path. If the Python interpreter is invoked from the installer directory,
@@ -121,19 +120,17 @@ Developer's Guide, available at
121120< http://www.bloomberg.com/professional/api-library> .
122121
123122
124- Examples
125- --------
123+ # # Examples
126124
127125A collection of complete Python programs covering a wide range of typical API
128- usage is available in the `examples` directory, located in the same directory
126+ usage is available in the [ ` examples` directory](examples/) , located in the same directory
129127as this ` README` file. Note that many examples make use of command-line
130128arguments to specify server and authentication configuration; in most cases
131129usage information can be obtained by passing the ` --help` option on the command
132130line.
133131
134132
135- Implementation Notes
136- --------------------
133+ # # Implementation Notes
137134
138135- The Bloomberg SDK for Python 2 does not provide direct support for Python
139136 ` unicode` objects. Clients can pass unicode data to SDK functions accepting
@@ -145,8 +142,7 @@ Implementation Notes
145142 ` pickle` modules.
146143
147144
148- Copyright and License
149- ---------------------
145+ # # Copyright and License
150146
151147All files Copyright 2012 Bloomberg Finance L.P.
152148
@@ -168,4 +164,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
168164LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
169165OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
170166SOFTWARE.
171-
0 commit comments