https://github.com/ibmstreams/pypi.streamsx.objectstorage
This is a step in allowing natural use of Streams for a Python developer. A project that will be registered with PyPi to allow 'pip install' of Python packages that support Python developers interacting with IBM Streams.
https://github.com/ibmstreams/pypi.streamsx.objectstorage
pypi python python-packages
Last synced: about 1 year ago
JSON representation
This is a step in allowing natural use of Streams for a Python developer. A project that will be registered with PyPi to allow 'pip install' of Python packages that support Python developers interacting with IBM Streams.
- Host: GitHub
- URL: https://github.com/ibmstreams/pypi.streamsx.objectstorage
- Owner: IBMStreams
- License: apache-2.0
- Created: 2019-02-04T08:54:08.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2020-12-07T08:07:24.000Z (over 5 years ago)
- Last Synced: 2025-01-23T18:50:34.949Z (over 1 year ago)
- Topics: pypi, python, python-packages
- Language: Python
- Homepage: http://ibmstreams.github.io/pypi.streamsx.objectstorage
- Size: 171 KB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python streamsx.objectstorage package
This exposes SPL operators in the `com.ibm.streamsx.objectstorage` toolkit as Python methods.
Package is organized using standard packaging to upload to PyPi.
The package is uploaded to PyPi in the standard way:
```
cd package
python setup.py sdist bdist_wheel upload -r pypi
```
Note: This is done using the `ibmstreams` account at pypi.org and requires `.pypirc` file containing the credentials in your home directory.
Package details: https://pypi.python.org/pypi/streamsx.objectstorage
Documentation is using Sphinx and can be built locally using:
```
cd package/docs
make html
```
or
ant doc
and viewed using
```
firefox python/package/docs/build/html/index.html
```
The documentation is also setup at `readthedocs.io`.
Documentation links:
* http://streamsxobjectstorage.readthedocs.io/
## Version update
To change the version information of the Python package, edit following files:
- ./package/docs/source/conf.py
- ./package/streamsx/objectstorage/\_\_init\_\_.py
When the development status changes, edit the *classifiers* in
- ./package/setup.py
When the documented sample must be changed, change it here:
- ./package/streamsx/objectstorage/\_\_init\_\_.py
- ./package/DESC.txt
## Test
When running in Streaming analytics service you may select a private endpoint to access your bucket, e.g. bucket given in location us-south and resiliency regional.
When running in your local Streams instance you should select a public endpoint.
```
export COS_BUCKET=
export COS_ENDPOINT=
```
When using local build (e.g. not forcing remote build), then you need to specifiy the toolkit location, for example:
export COS_TOOLKIT_HOME=$STREAMS_INSTALL/toolkits/com.ibm.streamsx.objectstorage
### Streaming Analytics service
Package can be tested with TopologyTester using the [Streaming Analytics](https://www.ibm.com/cloud/streaming-analytics) service.
Run the test with:
ant test-sas
or
```
cd package
python3 -u -m unittest streamsx.objectstorage.tests.test_objectstorage.TestStreamingAnalytics
```
#### Remote build
For using the toolkit from the build service (**force_remote_build**) run the test with:
Run the test with:
ant test-sas-remote
or
```
cd package
python3 -u -m unittest streamsx.objectstorage.tests.test_objectstorage.TestStreamingAnalyticsRemote
```
### Local Streams instance
Package can be tested with TopologyTester using a local and running Streams domain.
Make sure that the streams environment is set, the domain and instance is running and the environment variables:
STREAMS_USERNAME
STREAMS_PASSWORD
are setup.
Run the test with:
ant test
or
```
cd package
python3 -u -m unittest streamsx.objectstorage.tests.test_objectstorage.TestDistributed
```