Saravanan666/pypi-org huggingface dataset:
Package: datasette-updated
datasette-updatedDisplay the date your data was updatedInstallationInstall this plugin in the same environment as Datasette.datasetteinstalldatasette-updatedUsageYou can have a differentupdatedvalue per table, database or Datasette instance. If undefined at any level,updatedwill fall back in that order. If no value is set,updatedwill beunknown.Base metadata configurationIf you have knownupdatedvalues, you can define them in your basemetadata.(json|yml):{"plugins":{"datasette-updated":{"updated":"2023-12-14T23:04:42+00:00"}},"databases":{"my-database-name":{"plugins":{"datasette-updated":{"updated":"2023-01-01T00:00:00+00:00"}},"tables":{"my-table-name":{"plugins":{"datasette-updated":{"updated":"2020-01-01T00:00:00+00:00"}}...Plugin metadata configurationIf you want to define more dynamicupdatedvalue(s) ondatasette packageordatasette publish, put metadata for this plugin inYOUR_PLUGINS_DIR/datasette-updated/metadata.(json|yml). The following is an example that setsupdatedto the current date/time.mkdir-pplugins/datasette-updated/&&\echo'{"plugins": {"datasette-updated": {"updated": "'"$(date-Iseconds)"'"}}}'>plugins/datasette-updated/metadata.json&&\datasettepublish--plugins-dir=plugins...Combined metadata configurationYou can combine base metadata and plugin metadata configuration, but be aware that the basemetadata.(json|yml)will always win if there is a duplicate configuration value.Extra configurationThe base / instance level metadata can accept the following extra configuration (that will apply to all levels):time_type(default:time-ago)time:2023-12-01T00:00:00+00:00date:"Apr 11" or "Apr 11, 2013"time-ago:"a second ago", "32 seconds ago", "an hour ago", "14 hours ago"time-or-date:"3:26pm" or "Apr 11"weekday:"Today", "Yesterday", or the weekdayweekday-or-date:"Yesterday" or "Apr 11"{"plugins":{"datasette-updated":{"time_type":"time"}}}DisplayThe plugin will try to load a footer template that is copied from the default Datasette footer template, but with the following addition:{% if datasette_updated %}&middot;Updated:<timedata-local="{{ datasette_updated.time_type }}"datetime="{{ datasette_updated.updated }}">{{ datasette_updated.updated }}</time>{% endif %}If you have your own custom footer template, you will need to add the above code, as your base template will take precedence.Look atlocal_timefor extra configuration options (just ignore the Ruby parts).Screenshot and DemoExample site:https://querydata.io/The Javascript component converts time elements from UTC to the browser's local time.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cddatasette-updated
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: datasette-upgrade
datasette-upgradeUpgrade Datasette instance configuration to handle new featuresInstallationInstall this plugin in the same environment as Datasette.datasetteinstalldatasette-upgradeUsageThe plugin currently provides one command, which will split an old stylemetadata.jsonormetadata.ymlfile - which contains both metadata and plugin configuration and permissions, into a Datasette 1.0+metadata.ymlfile and adatasette.ymlfile.datasetteupgrademetadata-to-configmetadata.json-mmetadata.yml-cdatasette.ymlThis will leavemetadata.jsonin place, but will write outmetadata.ymlanddatasette.ymlas two new files.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cddatasette-upgrade
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: datasette-upload-csvs
datasette-upload-csvsDatasette plugin for uploading CSV files and converting them to database tablesInstallationdatasette install datasette-upload-csvsUsageThe plugin adds an interface at/-/upload-csvsfor uploading a CSV file and using it to create a new database table.By default onlythe root actorcan access the page - so you'll need to run Datasette with the--rootoption and click on the link shown in the terminal to sign in and access the page.Theupload-csvspermission governs access. You can use permission plugins such asdatasette-permissions-sqlto grant additional access to the write interface.
Package: datasette-upload-dbs
datasette-upload-dbsUpload SQLite database files to DatasetteInstallationInstall this plugin in the same environment as Datasette.datasette install datasette-upload-dbsConfigurationThis plugin requires you to configure a directory in which uploaded files will be stored.On startup, Datasette will automatically load any SQLite files that it finds in that directory. This means it is safe to restart your server in between file uploads.To configure the directory as/home/datasette/uploads, add this to ametadata.ymlconfiguration file:plugins:datasette-upload-dbs:directory:/home/datasette/uploadsOr if you are usingmetadata.json:{"plugins":{"datasette-upload-dbs":{"directory":"/home/datasette/uploads"}}}You can use"."for the current folder when the server starts, or"uploads"for a folder relative to that folder. The folder will be created on startup if it does not already exist.Then start Datasette like this:datasette -m metadata.ymlThe plugin defaults to loading all databases in the configured directory.You can disable this by adding the following setting:"skip_startup_scan": trueUsageOnly users with theupload-dbspermission will be able to upload files. Therootuser has this permission by default - other users can be granted access using permission plugins, see thePermissionsdocumentation for details.To start Datasette as the root user, run this:datasette -m metadata.yml --rootAnd follow the link that is displayd on the console.If a user has that permission they will see an "Upload database" link in the navigation menu.This will take them to/-/upload-dbswhere they will be able to upload database files, by selecting them or by dragging them onto the drop area.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-upload-dbs
python3 -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: datasette-vega
datasette-vegaADatasetteplugin that provides tools
for generating charts usingVega.Try out the latest master build as a live demo athttps://datasette-vega-latest.datasette.io/or try the latest release installed as a plugin athttps://fivethirtyeight.datasettes.com/To add this to your Datasette installation, install the plugin like so:pip install datasette-vegaThe plugin will then add itself to every Datasette table view.If you are publishing data using thedatasette publishcommand, you can
include this plugin like so:datasette publish now mydatabase.db --install=datasette-vegaIf you don't want to install any software at all, you can publish your CSV files with Datasette and activate this plugin using the web application athttps://publish.datasettes.com/
Package: datasette-vega-dashboards
datasette-vega-dashboardsBuild custom Vega/Vega-Lite dashboards in Datasette, for
presentation-ready plots and visualizations.InstallationInstall this plugin in the same environment as Datasette.$ datasette install datasette-vega-dashboardsTutorialSee the example fixture inexample_fixturefor a minimal example.
You can run the fixture via:datasette -m metadata.json --template-dir templates/ sleep_log.dband then openhttp://127.0.0.1:8001/sleep_log/read_sleepto see the dashboard.In the minimal example, we create a canned query inmetadata.json:"read_sleep":{"hide_sql":true,"sql":"SELECT * FROM (SELECT * FROM sleep_log ORDER BY date DESC LIMIT 7) ORDER BY date","write":false}The template for this canned query is extended by editing thetemplates/query-sleep_log-read_sleep.htmlfile. You can use the
instructions provided in theDatasette custom template
documentationto determine what the name of the file should be for other resources,
such as dashboards you want to display on a database or table.Each graph should have a<script>tag wrapped in a<div>tag.  The<script>tag should contain the Vega/Vega-Lite specification, andmusthave atypeof eitherapplication/vnd.vegalite+json(for
Vega-Lite) orapplication/vnd.vega+json(for Vega). The<div>tag
will be used for rendering the actual graph, and should have whatever
CSS styling you want (such as setting the width or height).<divstyle="width: 1000px"><scripttype="application/vnd.vegalite+json">/* insert vegalite spec here */</script></div><divstyle="width: 1000px"><scripttype="application/vnd.vega+json">/* or, insert a vega spec here */</script></div>Note that the Vega-Lite spec need not contain adatafield -- any data
field will be replaced by the plugin based on the data returned by the
canned query. For Vega specs, the data field will be prepended with a
new dataset with the namedata.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-vega-dashboards
python3 -mvenv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: datasette-verify
datasette-verifyVerify that SQLite files can be opened using DatasetteInstallationInstall this plugin in the same environment as Datasette.$ datasette install datasette-verifyThis plugin depends onDatasette 0.59a2or higher, as it uses theregister_commands()plugin hook.UsageTo confirm that files can be opened by Datasette, run the following:datasette verify file1.db file2.dbYou can pass one or more file paths.The command will exit silently with a 0 exit code if the files are all valid SQLite databases that Datasette can open.It will exit with a 1 exit code and display an error for the first file it finds that is not valid.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-verify
python3 -mvenv venv
source venv/bin/activateOr if you are usingpipenv:pipenv shellNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: datasette-visible-internal-db
datasette-visible-internal-dbDatasette plugin for making the internal database visible for debuggingDatasette 1.0a5 madethe internal databaseno longer visible through the Datasette interface.This plugin brings it back, for debugging purposes.InstallationInstall this plugin in the same environment as Datasette.datasetteinstalldatasette-visible-internal-dbThe internal database will now be publicly visible at/_internalin your Datasette instance.Controlling access to the internal databaseYou can use Datasette'spermissions mechanismto control who is allowed to interact with the internal database.To restrict access to just therootactor, drop this into your configuration:databases:_internal:allow:id:root
Package: datasette-webhook-write
datasette-webhook-writeDatasette plugin to write to database via verified webhooksInstallationInstall this plugin in the same environment as Datasette.$ datasette install datasette-webhook-writeUsage (datasette/receiving side)This plugin allows writing to a datasette database via hmac-signed http POST calls.Example for metadata.yml (for usage to receive texts fromhttps://nlg.ax/):plugins:datasette-webhook-write:webhook_secret:"$env":"WEBHOOK_SECRET"http_header_name:"x-myax-signature"database_name:"example"table_name:"generated_texts"use_pk:-"uid"-"collection_id"WEBHOOK_SECRETis set as environment variable.The url to upload to the datasette instance is/-/webhook-write/.Usage (pushing side)The json data pushed has to be signed with theWEBHOOK_SECRETand added to the headers of the POST call.Generate the hmac signature (wheredocumentis the data you want to send, andWEBHOOK_SECRETis the secret only pushing+receving parties should know):digest=hmac.new(key=WEBHOOK_SECRET.encode(),msg=json.dumps(document).encode(),digestmod=hashlib.sha1,)header={"X-SIGNATURE":f"sha1={digest.hexdigest()}",}The pushed data is written to the database only when secret+document are generating the same digest.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-webhook-write
python -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:python -m pip install -e '.[test]'To run the tests:pytest
Package: datasette-write
datasette-writeDatasette plugin providing a UI for writing to a databaseInstallationInstall this plugin in the same environment as Datasette.pipinstalldatasette-writeUsageHaving installed the plugin, visit/-/writeon your Datasette instance to submit SQL queries that will be executed against a write connection to the specified database.By default only therootuser can access the page - so you'll need to run Datasette with the--rootoption and click on the link shown in the terminal to sign in and access the page.Thedatasette-writepermission governs access. You can use permission plugins such asdatasette-permissions-sqlto grant additional access to the write interface.Pass?sql=...in the query string to pre-populate the SQL editor with a query. Pass?database=...to specify a database to run the query against.Parameterized queriesSQL queries can include parameters like this:insertintonews(title,body)values(:title,:body_textarea)These will be converted into form fields on the/-/writepage.If a parameter name ends with_textareait will be rendered as a multi-line textarea instead of a text input.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cddatasette-write
python3-mvenvvenvsourcevenv/bin/activateOr if you are usingpipenv:pipenvshellNow install the dependencies and tests:pipinstall-e'.[test]'To run the tests:pytest
Package: datasette-write-ui
datasette-write-uiA Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables.InstallationThis plugin requires the alpha version of Datasette 1.0. You can install it with:pipinstalldatasette==1.0a3After that, you can install this plugin in the same environment as Datasette.datasetteinstalldatasette-write-uiUsageOnce installed, the new UI elements will appear on the table page. You'll need special permission in order to see them. The easiest way is touse the root user, or otherwise use acustom actor.If you actor has theinsert-rowpermissions, you'll see the "Insert new row" button at the bottom of the page.If your actor has theupdate-rowpermissions, you'll see a new "Edit row" option in a new menu on each row.If your actor has thedelete-rowpermissions, you'll see a new "Delete row" option in a new menu on each row.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cddatasette-write-ui
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To install the JavaScript build dependencies, run this:npminstallYou can use theJustcommand runner to build the TypeScript to minified JavaScript like this:justjsTo run the tests:pytest
Package: datasette-x-forwarded-host
datasette-x-forwarded-hostTreat the X-Forwarded-Host header as the Host headerInstallationInstall this plugin in the same environment as Datasette.$ datasette install datasette-x-forwarded-hostUsageOnce installed, Datasette will replace thehostheader with the content of the incomingx-forwarded-hostheader.This helps Datasette generate links to new pages that work when hosted behind a proxy that rewrites thehostheader.Only use this plugin in deployment environmens where you know thex-forwarded-hostheader can be trusted!This has been tested on GitHub Codespaces.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-x-forwarded-host
python3 -mvenv venv
source venv/bin/activateOr if you are usingpipenv:pipenv shellNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: datasette-yaml
datasette-yamlExport Datasette records as YAMLInstallationInstall this plugin in the same environment as Datasette.$ datasette install datasette-yamlUsageHaving installed this plugin, every table and query will gain a new.yamlexport link.You can also construct these URLs directly:/dbname/tablename.yamlDemoThe plugin is running oncovid-19.datasettes.com- for example/covid/latest_ny_times_counties_with_populations.yamlDevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-yaml
python3 -mvenv venv
source venv/bin/activateOr if you are usingpipenv:pipenv shellNow install the dependencies and tests:pip install -e '.[test]'To run the tests:pytest
Package: datasette-youtube-embed
datasette-youtube-embedTurn YouTube URLs into embedded players in DatasetteInstallationInstall this plugin in the same environment as Datasette.datasette install datasette-youtube-embedUsageOnce installed, any columns containing URLs that look like one of these:https://www.youtube.com/watch?v=xyzhttps://www.youtube.com/watch?v=xyz&start=30https://www.youtube.com/watch?v=xyz&start=30&end=50Will be turned into YouTube embeds like this:<lite-youtubevideoid="xyz"params="start=30"style="min-width: 200px"></lite-youtube>These will then be rendered usingLite YouTube Embed, which avoids loading the full YouTube embed until someone interacts with it.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd datasette-youtube-embed
python3 -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: datasetutils
dataset-utilsA simple util to make your dataset flexable.BuildsRequirementsPython >3.6pillow 6.1.0Installationpipinstalldatasetutils==0.1.0How tofromPIL.ImageDrawimportImageDrawfromdatasetutils.datasetsimportMixInDatasetfromdatasetutils.mutationsimportResizeMutationfromdatasetutils.pastingimportLeftCornerPastingRule,RandomPastingRuledataset=\MixInDataset(root='dummy-data',mixing='landscapes',to_mix_with='figures')\.add_mutation_mixing(ResizeMutation((250,250)))\.add_mutation_to_mix_with(ResizeMutation((128,128)))\.paste_as(RandomPastingRule(250))foridx,(image,box)inenumerate(dataset.mix(2,2)):draw=ImageDraw(image)draw.rectangle([box.minx,box.miny,box.width+box.minx,box.height+box.miny],width=6,outline="red")image.show('s')image.save(f'output/{idx}.png',format='png')will yield to result in theoutputdirectory:
Package: datashackleproject
===========Datashackle===========Script that creates a Datashackle skeleton for a new Datashackle web application... contents::Description===========datashackleproject sets up a skeleton for building datashackle web applications.In order to do so, we are approaching a `buildout-based <http://www.buildout.org>`_ installation.**DISCLAIMER**This software is a prototype and not suitable for anything other than for demonstration purposes.**Prerequisites**OS: Linux or OS X, no WindowsBrowser: Only Firefox is supportedMySQL server installationPython 2.6 or 2.7**Install the required system packages**Before even getting the source code, we need to make sure you have all thesystem level dependencies installed. The following command will take care of itwhen working with a debian linux. This may look a bit different, if youuse another linux disto::$ sudo apt-get install python-virtualenv python-dev libxslt1-dev libxml2-dev$ sudo apt-get install python-pip libmysqlclient-devInstall PasteScript::$ pip install PasteScript**Installation and usage of datashackleproject**The first thing to get started with a new datashackle project is to installthe datashackleproject package, which provides a PasteScript template to createa buildout that sets up the environment for your new project::$ pip install datashackleprojectAfterwards you can run the ``datashackle`` script with the name of theproject you'd like to create as an argument::$ paster create -t datashackle myFirstDatashackleAppYou want to answer the questions when prompted. They are there to set intialproject configuration values. These can be changed later again.Change to your project directory::$ cd myFirstDatashackleAppDouble check the database connection parameters$ vim buildout.cfgThe next steps are optional. You may execute it if you experience problemswith your python environment::$ virtualenv --no-site-packages .$ source bin/activateBootstrap your buildout::$ sudo python bootstrap.pyNow you can run the buildout::$ bin/buildoutEnsure that the mysql server is running and can be reached with the credentials you entered earlier.Populate database with initial data:$ bin/migrate upgradeNow you can start the newly created app.$ bin/paster serve parts/etc/debug.iniPoint your browser to ``http://localhost:8080``Changes=======0.1 (2011-10-06)----------------Initial version.
Package: datashack-sdk
DatashackWhat is this?Create AWS Kinesis+Glue pipeline with Python, Javascript, Golang, Java.
(currently Python only)For example:fromdatashack_sdk_pyimportStreamingTable,Columndb=Database("db1","tables-bucket")UserEvents=StreamingTable("users","db1")UserEvents['id']=Column('string')UserEvents['age']=Column('int')UserEvents['name']=Column('string')UserEvents['ts']=Column('timestamp')rundatashack plan/applyto see the actual changes or actually applying them to your AWS account.creates this pipeline:Provision Kinesis+Spark+Glue+IamAutomate schema evolutionTestsPre-requisitesTo work with this project, you will need to have the following software installed on your machine:Windows 10, macOS 10.13 or later, or a modern Linux distribution4GB of RAM (8GB recommended)Node.js: You can download and install Node.js from the official website:https://nodejs.org/en/download/Python: You can download and install Python from the official website:https://www.python.org/downloads/Terraform: These tools are used for defining infrastructure as code. To install them, follow the instructions on the HashiCorp website:https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli.CDKTF: you can install the CDKTF CLI by running the following command:npm install --global cdktf-cli@latestAWS Account: create an AWS account if you don't have one and configure your local computer aws configuration withaws config-https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.htmlGetting Startedrun in your terminalpip install datashack-sdk --upgrade
git clone https://github.com/datashack-dev/datashack-sdk-examples
datashack plan ./datashack-sdk-examples/py_my_app/modelsRoadmapAdditional AWS servicesAdditional data sources and sinks, such as Apache Kafka or Elasticsearch3rd Party sources - Google Analytics, Salesforce ...Spark based transformation and processing capabilitiesIntegration with CICD workflowsIntegration with runtime applicationsTestingAutomatic documentation generationMore languages support for Datashack SDK: Go, Java, YamlStay tunedWe are working on a fully funcional beta with many more features. Join here so we can ping youhttps://www.datashack.dev/stay-in-touch