Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
wendelin
Commits
1ce1f2aa
Commit
1ce1f2aa
authored
Jun 07, 2019
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample upload script for Wendelin.
parent
20c49c81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
utils/sample_wendelin_upload.py
utils/sample_wendelin_upload.py
+26
-0
No files found.
utils/sample_wendelin_upload.py
0 → 100644
View file @
1ce1f2aa
#!//usr/bin/python
# -*- coding: utf-8 -*-
"""
Sample Python script to ingest into a Wendelin instance.
"""
import
msgpack
import
requests
# configure for your instance parameters below
reference
=
""
username
=
""
password
=
""
ingestion_policy_url
=
"https://%s:%s@....../erp5/portal_ingestion_policies/...../ingest"
%
(
username
,
password
)
data
=
{
"msg"
:
'Hello World! Zdravej Sviat!'
}
payload
=
msgpack
.
packb
([
0
,
data
],
use_bin_type
=
True
)
params
=
{
'reference'
:
reference
,
'data_chunk'
:
payload
}
headers
=
{
'CONTENT_TYPE'
:
'application/octet-stream'
}
r
=
requests
.
post
(
ingestion_policy_url
,
params
=
params
,
headers
=
headers
)
print
"Response=%s"
%
r
.
status_code
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment