https://github.com/techascent/tech.io
Generalized IO interface that uses urls and makes doing rapid research easier
https://github.com/techascent/tech.io
Last synced: 7 months ago
JSON representation
Generalized IO interface that uses urls and makes doing rapid research easier
- Host: GitHub
- URL: https://github.com/techascent/tech.io
- Owner: techascent
- License: epl-1.0
- Created: 2018-07-23T20:44:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-24T16:05:59.000Z (almost 3 years ago)
- Last Synced: 2024-11-04T05:35:41.522Z (over 1 year ago)
- Language: Clojure
- Size: 201 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tech.io
[](https://clojars.org/techascent/tech.io)
Simple Clojure IO library to enable rapid development on at least files, http/https, and s3.
* [API Documentation](https://techascent.github.io/tech.io/)
## Design
The philosophy is to split the difference between do-as-I-want programming which is what
I do at the repl and do-as-I-say programming which matches system programming much
closer. "tech.io" is DWIW, but it is built on an set of protocols to enable very
precise DWIS programming where surprises are minimal.
### Do What I Want:
```clojure
(io/get-nippy "s3://blah/blah.nippy")
(io/copy "s3://blah/blah.nippy" "file://blah.nippy")
(io/put-image! "s3://blah/blah.jpg" buffered-image)
```
This layer has a global variable you can use to override the way the system maps from
url->io-provider. Using this variable you can setup global caching so that anything
downloaded or read will get cached, regardless of where it came from (http, https, file,
s3). You can also setup redirection where a directory looks like s3 for unit tests that
read/write to s3 urls.
## License
Copyright © 2018 TechAscent, LLC
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.