Skip to main content


Build Status Opensource ByJG GitHub source GitHub license GitHub release

Anydataset NoSQL standardize the access to non-relational databases/repositories and treat them as Key/Value. The implementation can work with:

  • MongoDB
  • Cloudflare KV
  • S3
  • DynamoDB

Anydataset is an agnostic data source abstraction layer in PHP. See more about Anydataset here.


  • Access as Key/Value repositories different datasource
  • Allow put and get data
  • Simplified way to connect to the datasources

Connection Based on URI

The connection string for databases is based on URL.

See below the current implemented drivers:

DatasourceConnection String
Cloudflare KVkv://username:password@accountid/namespaceid
AWS DynamoDBdynamodb://accesskey:secretkey@hostname/tablename?params


Check implementation examples on


Just type:

composer require "byjg/anydataset-nosql"

Running Unit tests

docker-compose up -d
export MONGODB_CONNECTION="mongodb://"
export S3_CONNECTION="s3://aaa:12345678@us-east-1/mybucket?create=true&endpoint="
export DYNAMODB_CONNECTION="dynamodb://accesskey:secretkey@us-east-1/tablename?endpoint="

Setup MongoDB for the unit test

Set the environment variable:

  • MONGODB_CONNECTION = "mongodb://"

Setup AWS DynamoDb for the unit test

Set the environment variable:

  • DYNAMODB_CONNECTION = "dynamodb://accesskey:secretkey@region/tablename"

Setup AWS S3 for the unit test

Set the environment variable:

  • S3_CONNECTION = "s3://accesskey:secretkey@region/bucketname"

Cloudflare KV

Set the environment variable:

  • CLOUDFLAREKV_CONNECTION = "kv://email:authkey@accountid/namespaceid"


Open source ByJG