crossplane-function-pythonic 0.1.4__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crossplane-function-pythonic
3
- Version: 0.1.4
3
+ Version: 0.2.0
4
4
  Summary: A Python centric Crossplane Function
5
- Project-URL: Documentation, https://github.com/fortra/function-pythonic#readme
6
- Project-URL: Issues, https://github.com/fortra/function-pythonic/issues
7
- Project-URL: Source, https://github.com/fortra/function-pythonic
5
+ Project-URL: Documentation, https://github.com/crossplane-contrib/function-pythonic#readme
6
+ Project-URL: Issues, https://github.com/crossplane-contrib/function-pythonic/issues
7
+ Project-URL: Source, https://github.com/crossplane-contrib/function-pythonic
8
8
  Author-email: Patrick J McNerthney <pat@mcnerthney.com>
9
9
  License-Expression: Apache-2.0
10
10
  License-File: LICENSE
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.11
14
13
  Classifier: Programming Language :: Python :: 3.12
15
14
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Python: <3.14,>=3.11
17
- Requires-Dist: crossplane-function-sdk-python==0.9.0
18
- Requires-Dist: pyyaml==6.0.2
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Python: <3.15,>=3.12
17
+ Requires-Dist: crossplane-function-sdk-python==0.10.0
18
+ Requires-Dist: pyyaml==6.0.3
19
19
  Provides-Extra: packages
20
- Requires-Dist: kopf==1.38.0; extra == 'packages'
20
+ Requires-Dist: kopf==1.39.1; extra == 'packages'
21
21
  Provides-Extra: pip-install
22
- Requires-Dist: pip==25.2; extra == 'pip-install'
22
+ Requires-Dist: pip==25.3; extra == 'pip-install'
23
23
  Description-Content-Type: text/markdown
24
24
 
25
25
  # function-pythonic
@@ -45,11 +45,11 @@ spec:
45
45
  kind: XR
46
46
  mode: Pipeline
47
47
  pipeline:
48
- - step:
48
+ - step:
49
49
  functionRef:
50
50
  name: function-pythonic
51
51
  input:
52
- apiVersion: pythonic.fn.fortra.com/v1alpha1
52
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
53
53
  kind: Composite
54
54
  composite: |
55
55
  class VpcComposite(BaseComposite):
@@ -81,7 +81,7 @@ kind: Function
81
81
  metadata:
82
82
  name: function-pythonic
83
83
  spec:
84
- package: ghcr.io/fortra/function-pythonic:v0.1.3
84
+ package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.2.0
85
85
  ```
86
86
  ## Composed Resource Dependencies
87
87
 
@@ -227,7 +227,7 @@ The BaseComposite class provides the following fields for manipulating the Compo
227
227
  | self.spec | Map | The composite observed spec |
228
228
  | self.status | Map | The composite desired and observed status, read from observed if not in desired |
229
229
  | self.conditions | Conditions | The composite desired and observed conditions, read from observed if not in desired |
230
- | self.events | Events | Returned events against the Composite and optionally on the Claim |
230
+ | self.results | Results | Returned results applied to the Composite and optionally on the Claim |
231
231
  | self.connection | Connection | The composite desired and observed connection detials, read from observed if not in desired |
232
232
  | self.ready | Boolean | The composite desired ready state |
233
233
 
@@ -326,19 +326,19 @@ The fields are read only for `Resource.conditions` and `RequiredResource.conditi
326
326
  | Condition.lastTransitionTime | Timestamp | Last transition time, read only |
327
327
  | Condition.claim | Boolean | Also apply the condition the claim |
328
328
 
329
- ### Events
329
+ ### Results
330
330
 
331
- The `BaseComposite.events` field is a list of events to apply to the Composite and
331
+ The `BaseComposite.results` field is a list of results to apply to the Composite and
332
332
  optionally to the Claim.
333
333
 
334
334
  | Field | Type | Description |
335
335
  | ----- | ---- | ----------- |
336
- | Event.info | Boolean | Normal informational event |
337
- | Event.warning | Boolean | Warning level event |
338
- | Event.fatal | Boolean | Fatal events also terminate composing the Composite |
339
- | Event.reason | String | PascalCase, machine-readable reason for this event |
340
- | Event.message | String | Human-readable details about the event |
341
- | Event.claim | Boolean | Also apply the event to the claim |
336
+ | Result.info | Boolean | Normal informational result |
337
+ | Result.warning | Boolean | Warning level result |
338
+ | Result.fatal | Boolean | Fatal results also terminate composing the Composite |
339
+ | Result.reason | String | PascalCase, machine-readable reason for this result |
340
+ | Result.message | String | Human-readable details about the result |
341
+ | Result.claim | Boolean | Also apply the result to the claim |
342
342
 
343
343
  ## Single use Composites
344
344
 
@@ -348,7 +348,7 @@ just to run that Composition once in a single use or initialize task?
348
348
  function-pythonic installs a `Composite` CompositeResourceDefinition that enables
349
349
  creating such tasks using a single Composite resource:
350
350
  ```yaml
351
- apiVersion: pythonic.fortra.com/v1alpha1
351
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
352
352
  kind: Composite
353
353
  metadata:
354
354
  name: composite-example
@@ -361,16 +361,62 @@ spec:
361
361
 
362
362
  ## Quick Start Development
363
363
 
364
- The following example demonstrates how to locally render function-python
365
- compositions. First, install the `crossplane-function-pythonic` python
366
- package into the python environment:
364
+ function-pythonic includes a pure python implementation of the `crossplane render ...`
365
+ command, which can be used to render Compositions that only use function-pythonic. This
366
+ makes it very easy to test and debug using your IDE of choice. It is also blindingly
367
+ fast compared to `crossplane render`. To use, install the `crossplane-function-pythonic`
368
+ python package into the python environment.
367
369
  ```shell
368
370
  $ pip install crossplane-function-pythonic
369
371
  ```
370
- Next, create the following files:
372
+ Then to render function-pythonic Compositions, use the `function-pythonic render ...`
373
+ command.
374
+ ```shell
375
+ $ function-pythonic render --help
376
+ usage: Crossplane Function Pythonic render [-h] [--debug] [--log-name-width WIDTH] [--python-path DIRECTORY] [--render-unknowns]
377
+ [--allow-oversize-protos] [--context-files KEY=PATH] [--context-values KEY=VALUE]
378
+ [--observed-resources PATH] [--extra-resources PATH] [--required-resources PATH]
379
+ [--function-credentials PATH] [--include-full-xr] [--include-function-results] [--include-context]
380
+ PATH [PATH/CLASS]
381
+
382
+ positional arguments:
383
+ PATH A YAML file containing the Composite resource to render.
384
+ PATH/CLASS A YAML file containing the Composition resource or the complete path of a function=-pythonic BaseComposite subclass.
385
+
386
+ options:
387
+ -h, --help show this help message and exit
388
+ --debug, -d Emit debug logs.
389
+ --log-name-width WIDTH
390
+ Width of the logger name in the log output, default 40.
391
+ --python-path DIRECTORY
392
+ Filing system directories to add to the python path.
393
+ --render-unknowns, -u
394
+ Render resources with unknowns, useful during local development.
395
+ --allow-oversize-protos
396
+ Allow oversized protobuf messages
397
+ --context-files KEY=PATH
398
+ Context key-value pairs to pass to the Function pipeline. Values must be files containing YAML/JSON.
399
+ --context-values KEY=VALUE
400
+ Context key-value pairs to pass to the Function pipeline. Values must be YAML/JSON. Keys take precedence over --context-files.
401
+ --observed-resources, -o PATH
402
+ A YAML file or directory of YAML files specifying the observed state of composed resources.
403
+ --extra-resources PATH
404
+ A YAML file or directory of YAML files specifying required resources (deprecated, use --required-resources).
405
+ --required-resources, -e PATH
406
+ A YAML file or directory of YAML files specifying required resources to pass to the Function pipeline.
407
+ --function-credentials PATH
408
+ A YAML file or directory of YAML files specifying credentials to use for Functions to render the XR.
409
+ --include-full-xr, -x
410
+ Include a direct copy of the input XR's spedc and metadata fields in the rendered output.
411
+ --include-function-results, -r
412
+ Include informational and warning messages from Functions in the rendered output as resources of kind: Result..
413
+ --include-context, -c
414
+ Include the context in the rendered output as a resource of kind: Context.
415
+ ```
416
+ The following example demonstrates how to locally render function-python compositions. First, create the following files:
371
417
  #### xr.yaml
372
418
  ```yaml
373
- apiVersion: pythonic.fortra.com/v1alpha1
419
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
374
420
  kind: Hello
375
421
  metadata:
376
422
  name: world
@@ -382,10 +428,10 @@ spec:
382
428
  apiVersion: apiextensions.crossplane.io/v1
383
429
  kind: Composition
384
430
  metadata:
385
- name: hellos.pythonic.fortra.com
431
+ name: hellos.pythonic.crossplane.io
386
432
  spec:
387
433
  compositeTypeRef:
388
- apiVersion: pythonic.fortra.com/v1alpha1
434
+ apiVersion: pythonic.crossplane.io/v1alpha1
389
435
  kind: Hello
390
436
  mode: Pipeline
391
437
  pipeline:
@@ -393,50 +439,38 @@ spec:
393
439
  functionRef:
394
440
  name: function-pythonic
395
441
  input:
396
- apiVersion: pythonic.fn.fortra.com/v1alpha1
442
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
397
443
  kind: Composite
398
444
  composite: |
399
445
  class GreetingComposite(BaseComposite):
400
446
  def compose(self):
401
447
  self.status.greeting = f"Hello, {self.spec.who}!"
402
448
  ```
403
- #### functions.yaml
404
- ```yaml
405
- apiVersion: pkg.crossplane.io/v1beta1
406
- kind: Function
407
- metadata:
408
- name: function-pythonic
409
- annotations:
410
- render.crossplane.io/runtime: Development
411
- spec:
412
- package: ghcr.io/fortra/function-pythonic:v0.1.3
413
- ```
414
- In one terminal session, run function-pythonic:
415
- ```shell
416
- $ function-pythonic --insecure --debug --render-unknowns
417
- [2025-08-21 15:32:37.966] grpc._cython.cygrpc [DEBUG ] Using AsyncIOEngine.POLLER as I/O engine
418
- ```
419
- In another terminal session, render the Composite:
449
+ Then, to render the above composite and composition, run:
420
450
  ```shell
421
- $ crossplane render xr.yaml composition.yaml functions.yaml
451
+ $ function-pythonic render --debug --render-unknowns xr.yaml composition.yaml
452
+ [2025-12-29 09:44:57.949] io.crossplane.fn.pythonic.Hello.world [DEBUG ] Starting compose, 1st step, 1st pass
453
+ [2025-12-29 09:44:57.949] io.crossplane.fn.pythonic.Hello.world [INFO ] Completed compose
422
454
  ---
423
- apiVersion: pythonic.fortra.com/v1alpha1
455
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
424
456
  kind: Hello
425
457
  metadata:
426
458
  name: world
427
459
  status:
428
460
  conditions:
429
- - lastTransitionTime: "2024-01-01T00:00:00Z"
461
+ - lastTransitionTime: '2026-01-01T00:00:00Z'
430
462
  reason: Available
431
- status: "True"
463
+ status: 'True'
432
464
  type: Ready
433
- - lastTransitionTime: "2024-01-01T00:00:00Z"
465
+ - lastTransitionTime: '2026-01-01T00:00:00Z'
434
466
  message: All resources are composed
435
467
  reason: AllComposed
436
- status: "True"
468
+ status: 'True'
437
469
  type: ResourcesComposed
438
470
  greeting: Hello, World!
439
471
  ```
472
+ Most of the examples contain a `render.sh` command which uses `function-pythonic render` to
473
+ render the example.
440
474
 
441
475
  ## ConfigMap Packages
442
476
 
@@ -465,7 +499,7 @@ Then, in your Composition:
465
499
  functionRef:
466
500
  name: function-pythonic
467
501
  input:
468
- apiVersion: pythonic.fn.fortra.com/v1alpha1
502
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
469
503
  kind: Composite
470
504
  composite: |
471
505
  from example.pythonic import features
@@ -497,7 +531,7 @@ data:
497
531
  functionRef:
498
532
  name: function-pythonic
499
533
  input:
500
- apiVersion: pythonic.fn.fortra.com/v1alpha1
534
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
501
535
  kind: Composite
502
536
  composite: example.pythonic.features.FeatureOneComposite
503
537
  ...
@@ -511,7 +545,7 @@ kind: Function
511
545
  metadata:
512
546
  name: function-pythonic
513
547
  spec:
514
- package: ghcr.io/fortra/function-pythonic:v0.1.3
548
+ package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.2.0
515
549
  runtimeConfigRef:
516
550
  name: function-pythonic
517
551
  ---
@@ -604,7 +638,7 @@ data:
604
638
  functionRef:
605
639
  name: function-pythonic
606
640
  input:
607
- apiVersion: pythonic.fn.fortra.com/v1alpha1
641
+ apiVersion: pythonic.fn.crossplane.io/v1alpha1
608
642
  kind: Composite
609
643
  parameters:
610
644
  who: World
@@ -0,0 +1,17 @@
1
+ crossplane/pythonic/__about__.py,sha256=gXUN1UoV7TWafLuqL_UsLD_UlnDY6JmtTV7bvwphX6Q,73
2
+ crossplane/pythonic/__init__.py,sha256=A9U4-azc4DjSsOnOnjQxCkoTzsZMRBb_AvqzR_Bd95A,268
3
+ crossplane/pythonic/__main__.py,sha256=6vYRlYDJtqFgLyiTamnl3htiNOtz8QlDl5WlIP98I8o,31
4
+ crossplane/pythonic/command.py,sha256=s69oOVCgbm39gowvTy7ieaE-Vosckf24vcznJ6fO0Q4,3146
5
+ crossplane/pythonic/composite.py,sha256=SVgyhyg4MDNm_rGSrHUi81bd9Zqgnv3zaMKnaCMKB2s,21967
6
+ crossplane/pythonic/function.py,sha256=ShHhSJYblTB9BRx7NEtHgiyOconax7Lro0tLzzRyZdY,16564
7
+ crossplane/pythonic/grpc.py,sha256=Ts_-JywIr4Xzjjf_hr2uOlPK0O8A1SNN6ZaEjRckjL8,4318
8
+ crossplane/pythonic/main.py,sha256=ujUa_FYElQSGqnhZ-0NJrD3kSyYjfRbIp79FV2Yl7hs,599
9
+ crossplane/pythonic/packages.py,sha256=4TxyT6V79R0m4tJbC8R1gwU_vgHGLXKSBzeTTKd8xGo,5120
10
+ crossplane/pythonic/protobuf.py,sha256=Wf2VJteKR_0S8l96JKLoOI78yrcH258DVj03re_epFI,48163
11
+ crossplane/pythonic/render.py,sha256=4mq-slOSGoGbSPJiioeepWbdImSyVbas_hIEnJO_p5s,21069
12
+ crossplane/pythonic/version.py,sha256=jUi8Wk7malaNDdW3FemkcsqlSGygQCrRFvgWB3Sve8M,214
13
+ crossplane_function_pythonic-0.2.0.dist-info/METADATA,sha256=w5BMWBdP1wvuPR-zeE28frxeBi-S8f9UfDE2gcj2OHk,28576
14
+ crossplane_function_pythonic-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
+ crossplane_function_pythonic-0.2.0.dist-info/entry_points.txt,sha256=jJ4baywFDviB9WyAhyhNYF2VOCb6XtbRSjKf7bnBwhg,68
16
+ crossplane_function_pythonic-0.2.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
+ crossplane_function_pythonic-0.2.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,11 +0,0 @@
1
- crossplane/pythonic/__init__.py,sha256=A9U4-azc4DjSsOnOnjQxCkoTzsZMRBb_AvqzR_Bd95A,268
2
- crossplane/pythonic/composite.py,sha256=w6ts1Qy-Gp_EIjX3i-JRO3DGUDv-55T9EHnyEptsooo,21083
3
- crossplane/pythonic/function.py,sha256=XwswHXaOr0PbrapQ9bvU0zMmHMvg_TOAOFXwdRqp1w8,16395
4
- crossplane/pythonic/main.py,sha256=fkMk2WDdPpRQQe-wFcI-2P3f64ddsftzx91cHaT5rII,6894
5
- crossplane/pythonic/packages.py,sha256=4TxyT6V79R0m4tJbC8R1gwU_vgHGLXKSBzeTTKd8xGo,5120
6
- crossplane/pythonic/protobuf.py,sha256=t6Ozkdb4GlpUjwCYP7d2uCvCBxvN3rjHfBaz3IOvL0Y,47995
7
- crossplane_function_pythonic-0.1.4.dist-info/METADATA,sha256=yjUWvs_AS4h-jJ05JOJ8EbfcT1stjNgxQGWK3F3yS14,25386
8
- crossplane_function_pythonic-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- crossplane_function_pythonic-0.1.4.dist-info/entry_points.txt,sha256=jJ4baywFDviB9WyAhyhNYF2VOCb6XtbRSjKf7bnBwhg,68
10
- crossplane_function_pythonic-0.1.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
- crossplane_function_pythonic-0.1.4.dist-info/RECORD,,