{"id":16560081,"url":"https://github.com/dzikoysk/expressible","last_synced_at":"2026-03-08T11:36:51.398Z","repository":{"id":40363501,"uuid":"386451328","full_name":"dzikoysk/expressible","owner":"dzikoysk","description":"Utility library dedicated for functional \u0026 non-functional codebases to simplify modelling of success and failure responses for Java/Kotlin 🔀","archived":false,"fork":false,"pushed_at":"2024-07-29T23:59:18.000Z","size":400,"stargazers_count":31,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-02T01:19:26.432Z","etag":null,"topics":["coroutines","functional-programming","hacktoberfest","java","kotlin","kotlin-coroutines","option","panda","panda-lang","result","utility"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dzikoysk.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dzikoysk","custom":"https://panda-lang.org/support"}},"created_at":"2021-07-15T23:35:29.000Z","updated_at":"2025-10-23T06:10:05.000Z","dependencies_parsed_at":"2024-10-29T07:45:30.446Z","dependency_job_id":null,"html_url":"https://github.com/dzikoysk/expressible","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dzikoysk/expressible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzikoysk%2Fexpressible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzikoysk%2Fexpressible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzikoysk%2Fexpressible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzikoysk%2Fexpressible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzikoysk","download_url":"https://codeload.github.com/dzikoysk/expressible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzikoysk%2Fexpressible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30254594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T08:59:44.879Z","status":"ssl_error","status_checked_at":"2026-03-08T08:58:02.867Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coroutines","functional-programming","hacktoberfest","java","kotlin","kotlin-coroutines","option","panda","panda-lang","result","utility"],"created_at":"2024-10-11T20:28:00.885Z","updated_at":"2026-03-08T11:36:51.382Z","avatar_url":"https://github.com/dzikoysk.png","language":"Java","funding_links":["https://github.com/sponsors/dzikoysk","https://panda-lang.org/support"],"categories":[],"sub_categories":[],"readme":"# Expressible [![CI](https://github.com/panda-lang/expressible/actions/workflows/gradle.yml/badge.svg)](https://github.com/panda-lang/expressible/actions/workflows/gradle.yml) [![codecov](https://codecov.io/gh/panda-lang/expressible/branch/main/graph/badge.svg?token=LI1PAPD6NM)](https://codecov.io/gh/panda-lang/expressible) ![Maven Central](https://img.shields.io/maven-central/v/org.panda-lang/expressible)\nDependency free utility library for Java \u0026 Kotlin, dedicated for functional codebases that require enhanced response handling.\nExpress yourself with inspired by Rust, Kotlin and Vavr wrappers, to provide better API using this tiny library.\n\n\u003chr\u003e\n\nSupported wrappers (in `panda.std.*` package):\n\n| Features                                                                   | Description                                                                        |\n|----------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n| `Result\u003cValue, Error\u003e`                                                     | solve error handling gracefully, get rid of exception based side-effects           |\n| `Option\u003cValue\u003e`                                                            | enhanced alternative to standard `Optional\u003cValue\u003e`                                 |\n| `Lazy\u003cValue\u003e`                                                              | lazy values \u0026 runners                                                              |\n| `Completable\u003cValue\u003e` \u003cbr\u003ewith `Publisher` \u0026 `Subscriber`                   | synchronized alternative to `CompletableFuture\u003cValue\u003e`                             |\n| `Reference\u003cV\u003e`, \u003cbr\u003e`MutableReference\u003cV\u003e`, \u003cbr\u003e`Computed`                  | Simple reactive containers                                                         |\n| `Mono\u003cA\u003e`, \u003cbr\u003e`Pair\u003cA, B\u003e`, \u003cbr\u003e`Triple\u003cA, B, C\u003e`, \u003cbr\u003e`Quad\u003cA, B, C, D\u003e` | generic wrappers for set of values                                                 |\n| Throwing functions, runnables, suppliers and consumers                     | set of functional interfaces with support for exception signatures                 |\n| Tri and Quad consumers, functions and predicates                           | additional functional interfaces                                                   |\n| `PandaStream\u003cValue\u003e`                                                       | `Stream\u003cValue\u003e` wrapper with support for features provided by `expresible` library |\n\nBy default, expressible exposes non-terminating methods, \nso you can freely divide functions into smaller pieces and move from non-functional codebases without having a heart attack.\n\n\u003chr\u003e\n\n```kotlin\ndependencies {\n    implementation(\"org.panda-lang:expressible:1.3.6\") // Core library\n    implementation(\"org.panda-lang:expressible-kt:1.3.6\") // Kotlin extensions\n    testImplementation(\"org.panda-lang:expressible-junit:1.3.6\") // JUnit extensions\n}\n```\n\n### Examples\nSuggested snippets show only a small use-cases for the available api. \nYou're not forced to use this library this way, so you may need to find your style in expressing your thoughts.\nAdopting functional approach requires time and to simplify this process it's easier to slowly introduce new elements based on simple concepts.\n\n#### Result\n\nRather than using `Exception` based error handling, return meaningful errors and interact with api responses gracefully.\nFollowing functional programming patterns make sure your methods don't contain side effects and unexpected exit points. \n\n```kotlin\nclass UserEndpoint {\n    // You can use fully functional approach\n    fun createUser(request: HttpRequest, response: HttpResponse) =\n        userFacade.createUsername(request.param(\"username\"))\n            .peek { user -\u003e response.respondWithJsonDto(user) }\n            .onError { error -\u003e ErrorReposne(BAD_REQUEST, error) }\n}\n\nclass UserFacade {\n    // You can start adoption in a regular, non-functional codebases\n    fun createUser(username: String): Result\u003cUser, String\u003e {\n        if (userRepository.findUserByName(username).isPresent()) {\n            return error(\"User $username already exists\")\n        }\n        return ok(userRepository.createUser(username))\n    }\n}\n\ninternal class UserFacadeTest : UserSpec {\n    // JUnit support\n    @Test\n    fun `should create user with a valid username` () {\n        // given: a valid username\n        val username = 'onlypanda'\n        // when: user is created with the following name\n        val user = userFacade.createUser(username)\n        // then: user has been created\n        assertOk(username, user.map(User::getUsername))\n    }\n} \n```\n\n#### Option\nSimilar usage to `Optional\u003cValue\u003e` type provided by Java:\n\n```java\nOption\u003cString\u003e withValue = Option.of(\"Value\");\nOption\u003cString\u003e empty = Option.empty();\n```\n\n#### Lazy\n\n```java\nLazy\u003cString\u003e completed = new Lazy\u003c\u003e(\"Value\");\nLazy\u003cString\u003e lazy = new Lazy\u003c\u003e(() -\u003e \"Value\");\nLazy\u003cVoid\u003e initialize = Lazy.ofRunnable(() -\u003e \"Called just once);\n\nString value = completed.get();\n```\n\n#### Completable\n\n```java\nCompletable\u003cString\u003e completable = Completable.create();\n\ncompletable\n    .thenApply(value -\u003e parseBoolean(value))\n    .then(value -\u003e System.out.println(value));\n\ncompletable.complete(\"true\");\n```\n\n#### Reactive\n\n```java\nReference\u003cInteger\u003e a = reference(1);\nMutableReference\u003cInteger\u003e b = mutableReference(2);\nComputed\u003cInteger\u003e result = computed(dependencies(a, b), () -\u003e a.get() + b.get());\n\nresult.subscribe(value -\u003e System.out.println(value));\nb.update(3); // prints \"4\"\n```\n\n#### Panda Stream\n\n```java\nPandaStream\u003cString\u003e empty = PandaStream.empty();\nPandaStream\u003cString\u003e standard = PandaStream.of(new ArrayList\u003c\u003e().stream());\n```\n\n### Used by\n\n* [Panda Organization](https://github.com/panda-lang) ([Panda](https://github.com/panda-lang/panda), [Hub](https://github.com/panda-lang/hub), [Light](https://github.com/panda-lang))\n* [Reposilite](https://github.com/dzikoysk/reposilite)\n* Libraries like [CDN](https://github.com/dzikoysk/cdn), [Dependency-Injector](https://github.com/dzikoysk/dependency-injector)\n* [FunnyGuilds Organization](https://github.com/FunnyGuilds) ([FunnyGuilds](https://github.com/FunnyGuilds/FunnyGuilds), [FunnyCommands](https://github.com/FunnyGuilds/FunnyCommands))\n* Private projects and API consumers of the given libraries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzikoysk%2Fexpressible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzikoysk%2Fexpressible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzikoysk%2Fexpressible/lists"}