Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
4d16e9d
Create README.md
johankristianss Feb 4, 2022
5b6d607
Merge branch 'main' of github.com:colonyos/pyruntime
johankristianss Feb 4, 2022
7ae90a1
more impl
johankristianss Feb 4, 2022
9d423b7
more impl
johankristianss Feb 7, 2022
1886abf
Almost full impl of the api
johankristianss Feb 7, 2022
166014c
lamp use case in python
johankristianss Feb 7, 2022
b18fcd1
add get attribute and some doc
johankristianss Feb 8, 2022
18a82f5
all rpc method now implemented
johankristianss Feb 8, 2022
607e257
updated doc
johankristianss Feb 8, 2022
756cd0a
updated doc
johankristianss Feb 8, 2022
b33f3a9
now supports the latest colonies api
johankristianss Aug 6, 2022
05f7bb6
compliant with latest colonies
johankristianss Mar 7, 2023
a70fdaa
added example of dynamic faas with code injection
johankristianss Mar 8, 2023
32c93df
added wait function
johankristianss Mar 9, 2023
856e967
cleanup
johankristianss Mar 10, 2023
f226f27
added support registering functions and better examples
johankristianss Mar 11, 2023
170e500
basic workflow support
johankristianss Mar 12, 2023
526be71
map reduce wip
johankristianss Mar 12, 2023
7cf5f48
map reduce example and readme updates
johankristianss Mar 12, 2023
df341bc
updated readme
johankristianss Mar 12, 2023
e14c3e2
updated readme
johankristianss Mar 12, 2023
49d9a39
updated readme
johankristianss Mar 12, 2023
c611892
updated readme
johankristianss Mar 12, 2023
37a6cc0
updated readme
johankristianss Mar 12, 2023
fa970c8
updated readme
johankristianss Mar 12, 2023
8a7d25a
monad example
johankristianss Mar 12, 2023
bbec87f
monad example
johankristianss Mar 12, 2023
e51df58
monad example
johankristianss Mar 12, 2023
524e9b0
updated readme
johankristianss Mar 13, 2023
45af026
monad example
johankristianss Mar 13, 2023
e69a720
monad example
johankristianss Mar 13, 2023
275565b
monad example
johankristianss Mar 13, 2023
83c3c76
updated readme
johankristianss Mar 13, 2023
3ca0ad7
fixed typo
johankristianss Mar 13, 2023
05ceb08
fixed typo
johankristianss Mar 13, 2023
1673ce5
fixed typo
johankristianss Mar 13, 2023
8cb4201
updated monad example
johankristianss Mar 13, 2023
7fc9305
fixed typo
johankristianss Mar 13, 2023
8f20801
updated readme
johankristianss Mar 13, 2023
ba312e4
improved monads
johankristianss Mar 13, 2023
35bdc16
added licens
johankristianss Mar 13, 2023
f2516bc
typo
johankristianss Mar 13, 2023
c646077
updated examples
johankristianss Mar 14, 2023
7f60e9a
removing sleeps
johankristianss Mar 14, 2023
53f39fc
buggfix
johankristianss Mar 16, 2023
637d2cd
cleanup monad code and fix args bug
johankristianss Mar 22, 2023
99ea98c
removed junk file
johankristianss Apr 13, 2023
07df50c
updated readme
johankristianss Apr 16, 2023
ffa8495
updated readme
johankristianss Apr 16, 2023
90c0c2a
cleanup
johankristianss Apr 16, 2023
3b7f742
cleanup
johankristianss Apr 16, 2023
05656b4
updated Readme
johankristianss Apr 16, 2023
37aa45c
added github action
johankristianss Apr 16, 2023
0689be3
improved github action
johankristianss Apr 16, 2023
ae5d266
improved github action
johankristianss Apr 16, 2023
23d04b5
improved github action
johankristianss Apr 16, 2023
e45d416
improved github action
johankristianss Apr 16, 2023
e5b04d1
improved github action
johankristianss Apr 16, 2023
870ffd7
clean up
johankristianss Apr 17, 2023
6433da1
github action test
johankristianss Apr 18, 2023
19ec757
github action test
johankristianss Apr 18, 2023
a68907f
github action test
johankristianss Apr 18, 2023
5d721a5
github action test
johankristianss Apr 18, 2023
4e0bde0
github action test
johankristianss Apr 18, 2023
f079039
github action test
johankristianss Apr 18, 2023
93e0a93
github action test
johankristianss Apr 18, 2023
6f5a7e7
github action test
johankristianss Apr 18, 2023
eb552da
github action test
johankristianss Apr 18, 2023
e471126
github action test
johankristianss Apr 18, 2023
e2af522
github action test
johankristianss Apr 18, 2023
6f37b40
github action test
johankristianss Apr 18, 2023
0fc4a5e
github action test
johankristianss Apr 18, 2023
dd5ad48
github action test
johankristianss Apr 18, 2023
b722c35
github action test
johankristianss Apr 18, 2023
e2c56ee
github action test
johankristianss Apr 18, 2023
5a9c8dd
github action test
johankristianss Apr 18, 2023
baf63af
github action test
johankristianss Apr 18, 2023
e19b634
github action test
johankristianss Apr 18, 2023
732f9ce
github action test
johankristianss Apr 18, 2023
f3c3791
github action test
johankristianss Apr 18, 2023
9cbc230
github action test
johankristianss Apr 18, 2023
62caefc
github action test
johankristianss Apr 18, 2023
fd757ba
github action test
johankristianss Apr 18, 2023
4be7d9e
github action test
johankristianss Apr 18, 2023
8e29dbf
github action test
johankristianss Apr 18, 2023
8cf1cfb
github action test
johankristianss Apr 18, 2023
4aa9d23
github action test
johankristianss Apr 18, 2023
cf20a9b
github action test
johankristianss Apr 18, 2023
338049d
github action test
johankristianss Apr 18, 2023
5d876c1
github action test
johankristianss Apr 18, 2023
aa3566d
github action test
johankristianss Apr 18, 2023
83e0952
github action test
johankristianss Apr 18, 2023
e62faa6
Merge pull request #1 from colonyos/github_action
johankristianss Apr 18, 2023
4bbb70e
github action now working
johankristianss Apr 18, 2023
d567968
github action test
johankristianss Apr 18, 2023
b5f3212
github action badge
johankristianss Apr 18, 2023
3ed3a62
cleanup github action
johankristianss Apr 18, 2023
550de6a
cleanup github action
johankristianss Apr 18, 2023
fe80f88
tls support
johankristianss Jun 11, 2023
ae3ab2f
tls support
johankristianss Jun 11, 2023
bffa723
Merge pull request #2 from colonyos/tls_support
johankristianss Jun 11, 2023
9366e21
bugfixes and support for kwargs
johankristianss Jul 2, 2023
62abc99
suport for latest colonies
johankristianss Jul 6, 2023
3598daf
support for fs and updated unittests
johankristianss Aug 19, 2023
d939b15
using latest colonies in unittests
johankristianss Aug 19, 2023
837a0b4
added support for setting output
johankristianss Oct 12, 2023
ab4b93a
now compliant with colonies v1.7.0
johankristianss Nov 30, 2023
244aff8
support for colonies v1.7.6
johankristianss Dec 20, 2023
e6326ce
tls typo
johankristianss Dec 20, 2023
6b91d31
new makefile
johankristianss Dec 20, 2023
25efc54
trying to set args
johankristianss Dec 20, 2023
5513a54
trying to initdb env var
johankristianss Dec 20, 2023
22a2744
changed wf
johankristianss Dec 20, 2023
8067487
changed wf
johankristianss Dec 20, 2023
f453760
changed wf
johankristianss Dec 20, 2023
a470c53
changed wf
johankristianss Dec 20, 2023
5345fb8
changed wf
johankristianss Dec 20, 2023
6cb20fd
changed wf
johankristianss Dec 20, 2023
fc7f1e9
changed wf
johankristianss Dec 20, 2023
9a4542d
subscription permission fix
johankristianss Jan 8, 2024
8264acb
added des executor example
johankristianss Jan 9, 2024
2ed4c58
support libcfs
johankristianss Mar 7, 2024
33d54d6
moved cfs into pycolonies, also updated unit tests
johankristianss Mar 8, 2024
c2f9710
port bug fix
johankristianss Mar 8, 2024
1511574
latest Colonies and libcfslib
johankristianss Mar 8, 2024
4694fc8
updated workflow
johankristianss Mar 8, 2024
9084966
websocket fix
johankristianss Mar 9, 2024
4bb3012
github workflow fix
johankristianss Mar 9, 2024
39d2825
github workflow fix
johankristianss Mar 9, 2024
eff064e
added support listening files
johankristianss Mar 13, 2024
063f84d
add executorname condition to funcspec
ossko Mar 13, 2024
bb681e6
Merge pull request #3 from ossko/main
johankristianss Mar 14, 2024
6738ca3
updated cross platform example
johankristianss Mar 15, 2024
e9a6476
typo
johankristianss Mar 15, 2024
c88989d
first steps towards using types over dicts
ossko Mar 15, 2024
a970243
refactor the func_spec helper to use the new types
ossko Mar 20, 2024
7fb9f39
start updating the examples
ossko Mar 20, 2024
9a39afd
continue refactoring examples to use the new types
ossko Mar 21, 2024
c3998a2
keep fixing the examples
ossko Mar 21, 2024
cbb808c
keep fixing the examples
ossko Mar 21, 2024
576cba9
fix mutation of funcspec in monad examples
ossko Mar 21, 2024
f8ca65a
fix issue with processes lacking input
ossko Mar 21, 2024
a415e0d
extend proces input and output to include floats
ossko Mar 22, 2024
9d08c21
improve formatting
ossko Mar 22, 2024
ee73102
update readme to match the new API
ossko Mar 22, 2024
fefe119
Merge pull request #4 from ossko/typings
johankristianss Apr 23, 2024
b37b52f
python crypto
johankristianss Jun 27, 2024
9f4b3eb
working crypto
johankristianss Jun 28, 2024
c351e9e
cleanup
johankristianss Jun 28, 2024
997cd85
unit test fix
johankristianss Jun 28, 2024
b83b653
Merge pull request #5 from colonyos/pycrypto
johankristianss Jun 28, 2024
1d2dcca
cleanup
johankristianss Jun 28, 2024
a626510
improved support for colonyfs
johankristianss Jul 1, 2024
b0ac558
automatically creating a bucket if it does not exsits
johankristianss Jul 1, 2024
def7dc2
remove debug prints
johankristianss Jul 3, 2024
4762fb5
1.0.20
johankristianss Jul 3, 2024
b0200de
better error handling
johankristianss Jul 9, 2024
25167cb
improved readme and crypto tests
johankristianss Jul 18, 2024
02d90d5
latest colonies 1.8.7
johankristianss Jul 18, 2024
e97088d
latest colonies 1.8.7
johankristianss Jul 18, 2024
1a12f35
changed processes-per-node to processespernode
johankristianss Jul 18, 2024
52aaf56
added support for managing crons
johankristianss Sep 22, 2024
e90cccc
fix issue with faulty parameter name
ossko Jan 22, 2025
1df4175
update kwargs to allow lists of strings
ossko Jan 22, 2025
fdaffa6
cleanup parameter name fix
ossko Jan 22, 2025
ea45e47
remove hardcoded hostname and key to make it easier to run tests locally
ossko Jan 23, 2025
a09e3b3
change to pydantic v2 style field validator for file labels
ossko Jan 23, 2025
99e2a32
Merge pull request #6 from ossko/main
johankristianss May 2, 2025
34fa37a
Update gitignore to ignore build dir
segeljakt Aug 20, 2025
3f725e9
Minor conciseness fixes
segeljakt Aug 15, 2025
930beed
Add types to Colonies fields
segeljakt Aug 20, 2025
666c17d
Add support for missing RPCs
segeljakt Aug 15, 2025
6b3dcdf
Make API typesafe
segeljakt Aug 15, 2025
096654d
Make RPC typesafe
segeljakt Aug 19, 2025
2221fca
Proposal: Rename func_spec(..) to FuncSpec.create(..)
segeljakt Aug 20, 2025
8534722
Remove unused variables
segeljakt Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Python3

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
runner-job:
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# label used to access the service container
minio:
image: fclairamb/minio-github-actions
ports:
- 9000:9000
env:
MINIO_DOMAIN: localhost
postgres:
# docker hub image
image: postgres
# provide the password for postgres
env:
POSTGRES_PASSWORD: rFcLGNkgsNtksg6Pgtn9CumL4xXBQ7
# set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# maps tcp port 5432 on service container to the host
- 5432:5432
colonies:
image: colonyos/colonies:v1.8.2
env:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LC_CTYPE: UTF-8
TZ: Europe/Stockholm
COLONIES_SERVER_TLS: false
COLONIES_SERVER_HOST: localhost
COLONIES_SERVER_PORT: 50080
COLONIES_MONITOR_PORT: 21120
COLONIES_MONITOR_INTERVAL: 1
COLONIES_SERVER_ID: 039231c7644e04b6895471dd5335cf332681c54e27f81fac54f9067b3f2c0103
COLONIES_SERVER_PRVKEY: fcc79953d8a751bf41db661592dc34d30004b1a651ffa0725b03ac227641499d
COLONIES_DB_HOST: postgres
COLONIES_DB_USER: postgres
COLONIES_DB_PORT: 5432
COLONIES_DB_PASSWORD: rFcLGNkgsNtksg6Pgtn9CumL4xXBQ7
COLONIES_COLONY_NAME: test
COLONIES_COLONY_ID: 4787a5071856a4acf702b2ffcea422e3237a679c681314113d86139461290cf4
COLONIES_COLONY_PRVKEY: ba949fa134981372d6da62b6a56f336ab4d843b22c02a4257dcf7d0d73097514
COLONIES_EXECUTOR_ID: 3fc05cf3df4b494e95d6a3d297a34f19938f7daa7422ab0d4f794454133341ac
COLONIES_PRVKEY: ddf7f7791208083b6a9ed975a72684f6406a269cfa36f1b1c32045c0a71fff05
COLONIES_EXECUTOR_TYPE: cli
COLONIES_CRON_CHECKER_PERIOD: 1000
COLONIES_GENERATOR_CHECKER_PERIOD: 1000
COLONIES_EXCLUSIVE_ASSIGN: true
COLONIES_INITDB: true
ports:
- 50080:50080
options: >-
--health-cmd "colonies server alive"
--health-interval 1s
--health-timeout 60s
--health-retries 20
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/checkout@v3
with:
python-version: 3.9

- name: Test
env:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LC_CTYPE: UTF-8
TZ: Europe/Stockholm
COLONIES_SERVER_TLS: false
COLONIES_DB_HOST: localhost
COLONIES_DB_USER: postgres
COLONIES_DB_PORT: 5432
COLONIES_DB_PASSWORD: rFcLGNkgsNtksg6Pgtn9CumL4xXBQ7
COLONIES_SERVER_HOST: localhost
COLONIES_SERVER_PORT: 50080
COLONIES_SERVER_ID: 039231c7644e04b6895471dd5335cf332681c54e27f81fac54f9067b3f2c0103
COLONIES_SERVER_PRVKEY: fcc79953d8a751bf41db661592dc34d30004b1a651ffa0725b03ac227641499d
COLONIES_COLONY_NAME: test
COLONIES_COLONY_ID: 4787a5071856a4acf702b2ffcea422e3237a679c681314113d86139461290cf4
COLONIES_COLONY_PRVKEY: ba949fa134981372d6da62b6a56f336ab4d843b22c02a4257dcf7d0d73097514
COLONIES_EXECUTOR_ID: 3fc05cf3df4b494e95d6a3d297a34f19938f7daa7422ab0d4f794454133341ac
COLONIES_PRVKEY: ddf7f7791208083b6a9ed975a72684f6406a269cfa36f1b1c32045c0a71fff05
COLONIES_EXECUTOR_NAME: cli
COLONIES_EXECUTOR_TYPE: cli
CRYPTOLIB: /home/runner/work/pycolonies/pycolonies/lib/libcryptolib.so
CFSLIB: /home/runner/work/pycolonies/pycolonies/lib/libcfslib.so
AWS_S3_ENDPOINT: localhost:9000
AWS_S3_ACCESSKEY: minioadmin
AWS_S3_SECRETKEY: minioadmin
AWS_S3_TLS: false
AWS_S3_SKIPVERIFY: false
AWS_S3_BUCKET: test
run: make github_test
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
__pycache__/
*.swp
pycolonies.egg-info
dist
__pycache__/
*.swp
build/
.vscode
libcryptolib.so
libcfslib.so
8 changes: 8 additions & 0 deletions .pypirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[distutils]
index-servers=pypi

[pypi]
repository: https://upload.pypi.org/legacy/

[testpypi]
repository: https://test.pypi.org/legacy/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 colonyos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
all: build

.PHONY: build
build:
python3 setup.py sdist bdist_wheel

.PHONY: test
test:
@python3 ./test/crypto_test.py
@python3 ./test/colonies_test.py

.PHONY: github_test
github_test:
wget https://github.com/colonyos/colonies/releases/download/v1.8.7/colonies_1.8.7_linux_amd64.tar.gz
tar -xzf colonies_1.8.7_linux_amd64.tar.gz
env
./colonies database create
./colonies colony add --name ${COLONIES_COLONY_NAME} --colonyid ${COLONIES_COLONY_ID}
./colonies executor add --spec ./executor.json --executorid ${COLONIES_EXECUTOR_ID}
./colonies executor approve --name ${COLONIES_EXECUTOR_NAME}
@pip3 install -r requirements.txt
@python3 ./test/crypto_test.py
@python3 ./test/colonies_test.py

.PHONY: install
install:
pip3 install dist/pycolonies-1.0.24-py3-none-any.whl --force-reinstall

publish:
python3 -m twine upload dist/pycolonies-1.0.24-py3-none-any.whl
Loading