sdk-push-stream-python's People
sdk-push-stream-python's Issues
Small bug in python example
There's a missing parameter in the function call at https://github.com/coveo-labs/SDK-Push-Stream-Python/blob/master/examples/push_multiple_from_csv_batch.py#L72, which causes a bool not iterable
error.
Calling Push.End doesn't clear the existing documents added through Push.Add
If your code is pushing content to different sources, after pushing the content in the first source and calling Push.End, the array isn't emptied properly, and all of the documents you previously pushed are still there, so that when you call Push.Start for your second source, all of your documents are still there, which means that your second source ends up with all the documents from your first source on top of the ones you actually want.
The following code snippet shows the issue in action:
from coveopush import CoveoPush
from coveopush import Document
from coveopush import CoveoPermissions
from coveopush import CoveoConstants
moviesettings ={
"sourceId": "valid source id",
"orgId": "valid org id",
"apiKey": "valid api key"
}
directorsettings = {
"sourceId": "valid source id",
"orgId": "valid org id",
"apiKey": "valid api key"
}
def push_movies():
moviepush = CoveoPush.Push(moviesettings["sourceId"], moviesettings["orgId"], moviesettings["apiKey"])
moviepush.Start(True, True)
mydoc = Document('file://python.test.movie.txt')
mydoc.Title = "Python Test"
mydoc.SetData("This is a test I'm doing with the Python SDK")
mydoc.FileExtension = ".txt"
moviepush.Add(mydoc)
moviepush.End(True, True)
def push_directors():
directorpush = CoveoPush.Push(directorsettings["sourceId"], directorsettings["orgId"], directorsettings["apiKey"])
directorpush.Start(True, True)
mydoc = Document('file://python.test.director.txt')
mydoc.Title = "Python Test"
mydoc.SetData("This is a test I'm doing with the Python SDK")
mydoc.FileExtension = ".txt"
directorpush.Add(mydoc)
directorpush.End(True, True)
push_movies()
push_directors()
missing on pypi
Can't find this package on Pypi, could you publish it please?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.