Saravanan666/pypi-org huggingface dataset:
Package: tracarbon
📌 OverviewTracarbon is a Python library that tracks your device's energy consumption and calculates your carbon emissions.It detects your location and your device automatically before starting to export measurements to an exporter.
It could be used as a CLI with already defined metrics or programmatically with the API by defining the metrics that you want to have.Read more in thisarticle.📦 Where to get it# Install Tracarbonpipinstalltracarbon# Install one or more exporters from the listpipinstall'tracarbon[datadog,prometheus,kubernetes]'🔌 Devices: energy consumptionDevicesDescriptionMac✅ Global energy consumption of your Mac (must be plugged into a wall adapter).Linux⚠️ Only withRAPL. See#1. It works with containers onKubernetesusing theMetric APIif available.Windows❌ Not yet implemented. See#184.Cloud ProviderDescriptionAWS✅ Use the hardware's usage with the EC2 instances carbon emissions datasets ofcloud-carbon-coefficients.GCP❌ Not yet implemented.Azure❌ Not yet implemented.📡 ExportersExporterDescriptionStdoutPrint the metrics in Stdout.JSONWrite the metrics in a JSON file.PrometheusSend the metrics to Prometheus.DatadogSend the metrics to Datadog.🗺️ LocationsLocationDescriptionSourceWorldwideGet the latest co2g/kwh in near real-time using the CO2Signal or ElectricityMaps APIs. Seeherefor the list of available zones.CO2Signal APIorElectricityMapsEuropeStatic file created from the European Environment Agency Emission for the co2g/kwh in European countries.EEA websiteAWSStatic file of the AWS Grid emissions factors.cloud-carbon-coefficients⚙️ ConfigurationThe environment variables can be set from an environment file.env.ParameterDescriptionTRACARBON_CO2SIGNAL_API_KEYThe api key received fromCO2SignalorElectricityMaps.TRACARBON_CO2SIGNAL_URLThe url ofCO2Signalis the default endpoint to retrieve the last known state of the zone, but it could be changed toElectricityMaps.TRACARBON_METRIC_PREFIX_NAMEThe prefix to use in all the metrics name.TRACARBON_INTERVAL_IN_SECONDSThe interval in seconds to wait between the metrics evaluation.TRACARBON_LOG_LEVELThe level to use for displaying the logs.🔎 UsageRequest your API keyGo toCO2Signaland get your free API key for non-commercial use, or go toElectricityMapsfor commercial use.This API is used to retrieve the last known carbon intensity (in gCO2eq/kWh) of electricity consumed in your location.Set your API key in the environment variables, in the.envfile or directly in the configuration.If you would like to start without an API key, it's possible, the carbon intensity will be loaded statistically from a file.Launch Tracarbon 🚀Command LinetracarbonrunAPIfromtracarbonimportTracarbonBuilder,TracarbonConfigurationconfiguration=TracarbonConfiguration()# Your configurationtracarbon=TracarbonBuilder(configuration=configuration).build()tracarbon.start()# Your codetracarbon.stop()withtracarbon:# Your codereport=tracarbon.report()# Get the report💻 DevelopmentLocal: using Poetrymakeinit
maketest-unit🛡️ LicenceApache License 2.0📚 DocumentationThe documentation is hosted here:https://fvaleye.github.io/tracarbon/documentation
Package: tracardi-day-night-split
Day, Night split actionThe purpose of this plugin is to split the workflow depending on day or night of its execution.It will check if the event happened at day or night. Then it will route the workflow to the appropriate output port.This action minds the location of the event. Therefore, you must provide latitude and longitude in configuration.ConfigurationThis node requires configuration. In order to read longitude or latitude you must define path to its data.
Use dot notation to do that.Example{"latitude":"payload@location.latitude","longitude":"payload@location.longitude"}Input payloadThis node does not process input payload.OutputThis node has two output nodes. One for DAY route and one for NIGHT node. The DAY one is active when event happened at
day. The NIGHT node is active when it is night.Active output ports will return input payload.
Package: tracardi-discord-webhook
Discord webhook pluginThis plugin sends discord messages.ConfigurationConfiguration needs a discord webhook url. Webhooks can be created in discord application. Click settings in the channel
that you would like to send message to.  Then click integrations and webhooks.  Expand webhook list and click
new webhook. Give it a name and copy url. This url should be copied to URL in the configuration JSON.{"url":"https://discord.com/api/webhooks/879132030/kXYSPpId...","timeout":10,"message":"Hello {{profile@traits.private.name}}","username":"<username>"}InputThis plugin does not process input payload.OutputThis plugin returns either the input payload on response port or and error on error port.
Package: tracardi-event-counter
Event counterThis plugin reads how many events of defined type were triggered within defined time.ConfigurationExample{
 "event_type": "page-view",
 "time_span": "-15m"
}event_type- value should be a string containing type of event that user wants to count.time_span- should be a string containing time span which user wants to search in, for example using"-1h30min"as"time_span"on 1st March 2022, 1:00 (a.m.) results in searching through all events that happened between 28th February 2022, 23:30 and 1st March 2022, 1:00 (a.m.). Presence of"-"sign in timeSpan does not matter, since it is stripped anyway. For more details, visitpytimeparse library documentation.OutputPlugin outputs number of found events.Example:{
    "events" : 39
}
Package: tracardi-event-scheduler
Event schedulerThis action will schedule an event to be triggered after given time.Configuration{"event_type":"<event-type>","properties":{},"postpone":"+1m"}event_type- type name of event type. e.g. 'page-view', 'purchase-order'.properties- event properties. This is a regular object with key value pairs.postpone- for how long would you like the event to be postponed. For exmaple 1m means trigger event one minute after the action was executed.InputThis node does not process input dataOutputPostponed task details. It will include the event iself with , context,profile, etc.
Package: tracardi-fullcontact-webhook
Full contact webhookIntroFullContact.com is an Identity Resolution Platform. It allows you to resolve and enrich people by submitting any
identifiers you already have, such as a personal email address, work email address, phone number, name and home address,
social ID, social URL and social username (except Facebook and Instagram).In order to use FullContact you wil have to obtain an API_KEY that will allow you to access FullContact API.To do that go to fullcontact.com, register and follow the steps on the page.ConfigurationExample of configuration.{"source":{"id":"resource-id"},"pii":{"email":"email@email.com","emails":["email1@email.com","email2@email.com"],"phone":"+1838747734","phones":["+1838747734","+1838747735"],"location":null,"name":"Adam"}}Configuration schema descriptionresource-idmust be valid id from resource list that points to FullContact api key. Please see below the schema of
the credentials.piidoes not need all the data from example. It is ok to provide onlye-mailorphone.Example of FullContact resource credentials{"token":"API_KEY"}API_KEYmust be replaced by API_KEY provided by FullContact service.Example ofpiidataThis configuration is valid too:{"source":{"id":"resource-id"},"pii":{"email":"email@email.com"}}The more data you provide th better as FullContact will be able to match the person more precisely.You can use dotted notation to access data from profile or event. This can be done like this.{"source":{"id":"resource-id"},"pii":{"email":"profile@traits.private.email"}}Stringprofile@traits.private.emailwill be replaced with the value (path to valuetraits.private.email) from
profile.InputThis action does not need payload.OutputIf the connection to FullContact was successful the port payload will return the response data.
Otherwise, the payload port will be inactive and the error message will be returned on error port.Example of successful response on port payload{"status":200,"body":{"fullName":"Kazi Amki","ageRange":null,"gender":"Male","location":"Sao Paulo","title":"Film Writer","organization":"Freelance","linkedin":null,"facebook":null,"bio":null,"website":null,"details":{"name":{"given":"Kazi","family":"Amki","full":"Kazi Amki"},"age":null,"gender":"Male","demographics":{"gender":"Male"},"emails":[],"phones":[],"locations":[{"region":"Sao Paulo","country":"Brazil","countryCode":"BR","formatted":"Sao Paulo"}],"employment":[{"name":"Freelance","current":true,"title":"Film Writer"}],"photos":[],"education":[{"name":"ECA - USP","degree":"Publishing"}],"urls":[],"interests":[]},"updated":"2021-06-16"}}
Package: tracardi-graph-runner
Tracardi Graph Runner LibraryThis library is part of TRACARDI Customer Data Platform.Tracardiis a open-source Customer Data Platform.TRACARDI is an API-first solution, low-code / no-code platform aimed at any e-commerce business that
wants to start using user data for marketing purposes. If you own a brand new e-commerce platform or
a legacy system you can integrate TRACARDI easily. Use TRACARDI for:Customer Data Integration- You can ingest, aggregate and store customer data
from multiple sources in real time at any scale and speed due to elastic search backend.Customer Data Modelling-  You can manage data. Define rules that will model data delivered
from your page and copy it into user profile. You can segment customers into custom segments.User Experience Personalization- You can personalize user experience with
real-time customer segmentation and targeting.Profile Unification- You can merge customer data from various sources to
single profile. Auto de-duplicate customer records. Blend customers in one account.Automation- TRACARDI is a great framework for creating
marketing automation apps. You can send your data to other systems easilyMain projectVisithttp://github.com/atompie/tracardifor main project.LicenseTracardi is available under MIT with Common Clause license.
Package: tracardi-key-counter
Key counterThis plugin counts key strings. Key string provided in configuration will be treated as an information to increase the
value of a key in profile. This plugin can be used for simple statistics e.g. count how many user visited us on mobile
device vs other devices like desktop or tablet.ExamplesFor example if the key is a simple value and equals to:["a","b","a"]then the key count equals to{"a":2,"b":1}If the key values are:[{"key1":1},{"key2":2},{"key1":2}]then the key will be increased by the provided value. Thenkey1+ 1,key2+ 2, andkey1+ 2. And the result will
be:{"key1":3,"key2":2}You may also want to pass data the following way:{"key1":1,"key2":2}This will also work and the result will be:{"key1":1,"key2":2}Configuration{"key":"desktop","save_in":"profile@stats.counters.MobileVisits"}Example of configuration with dot notation inkeyandsave_in{"key":"event@session.context.browser.agent","save_in":"profile@stats.counters.visits_origins"}Or with multiple key fields.{"key":["event@session.context.browser.agent","event@session.context.browser.agent.string"],"save_in":"profile@stats.counters.visits_origins"}keymay be a string or a list of strings. Also, a dot notation can be used to access data.save_inpoint to data in profile that will hold the information on key counts. It should be empty object{}or a
key-value object.save_inholds the original data that will be incremented.
Package: tracardi-language-detection
Language detection PluginThe purpose of this plugin is detect language from given string with meaningcloud APIConfigurationThis node requires configuration. You need have an account in meaningcloud to get access to API.Example{"source":{"id":"<source-id>"},"message":"Hello world!","timeout":10}source.id- enter your resource id with access token, See below for resource schema.message- enter your message.timeout- response time-out.Resource configurationExample{"token":"<token>"}Please register tohttps://www.meaningcloud.com/developer/account/subscriptionsto obtain token.UseApi-Tokenresource template in GUI to create this kind of resource.InputThis node does not process input payload.OutputThis node returns json with API response at response port if API call was successful.Example of successful call{"status":200,"body":{"deepTime":0.04363226890563965,"language_list":[{"iso-639-1":"en","iso-639-2":"eng","iso-639-3":"eng","language":"en","name":"English","relevance":100}],"status":{"code":0,"msg":"OK","credits":1,"remainig_credits":19964},"time":0.04784107208251953}}
Package: tracardi-local-timespan
Local time span actionThe purpose of this plugin is to check if the local time is within
defined time span.This action minds the time zone of the event. Therefore, you must provide
time zone. By default, time zone is included in browser event context.ConfigurationThis node requires configuration. In order to read timezone
you must define path to it. Use dot notation to do that.Moreover, you need to set start and end of the time span. The time slots
have no default values.Example of the configuration:{"timezone":"session@context.time.tz","start":"12:00:00","end":"14:00:00"}InputThis node does not process input payload.OutputReturn input payload on IN port or OUT port. Returns data on IN port if local time is in defined time span.
Package: tracardi-maxmind-geolite2
GeoLite2 pluginThis plugin connects geoIP servers and returns location of the customer based on the provided ip address.JSON ConfigurationExample:{"source":{"id":"5600c92a-835d-4fbe-a11d-7076fd983434"},"ip":"payload@ip"}IP value can be a path to value in profile, payload, or event or IP address itself.Resource configurationTo run this plugin you must provide source id that has configured GeoLite2 server credentials.Example of source configuration for GeoLite2 API:{"host":"geolite.info","license":"<license-key>","accountId":"<account-id>"}You must providelicense-keyandaccount-idto connect to MaxMind GeoLite2 API.
Package: tracardi-mongodb-connector
Mongo connectorThis plugin connects to mongo and queries this database.Configuration{"source":{"name":"MongoDB","id":"fbabb00e-a724-40bf-b889-bd8d6a7f25e2"},"database":"my_database","collection":"my_collection","query":"{}"}database- database name.collection- mongodb collection.query- mongodb query.InputThis node does not process input payload.OutputQuery result.
Package: tracardi-mysql-connector
Mysql ConnectorThis plugin connects to Mysql and executes a SQL query.ConfigurationExample{"source":{"name":"mysql","id":"a8430a5c-43de-44eb-9c25-2b1426aed3a0"},"type":"select","query":"SELECT * FROM user WHERE User=%s;","data":["root"],"timeout":10}sourcethis a resource with MySQL credentials. See below for credentials schema.type- type of query, possible values are ['select', 'insert', 'delete', 'update']query- this is the SQL prepared statement. It will replace %s with data provided indatakey. This is a
sequential order so order of %s and data matters.data- data to replace in SQL prepared statement template.timeout- query timeout.OutputIt returns the data in JSON.Example{"result":[{"Host":"%","User":"root","Select_priv":"Y","Insert_priv":"Y","Update_priv":"Y","Delete_priv":"Y","Create_priv":"Y","Drop_priv":"Y"},{"Host":"localhost","User":"root","Select_priv":"Y","Insert_priv":"Y","Update_priv":"Y","Delete_priv":"Y","Create_priv":"Y","Drop_priv":"Y"}]}If the query is of insert type then the output result will have last inserted record id.If the query is of type "delete","update", or "create" then the output result will have input payload.ErrorsNot all arguments converted during string formattingThis error is raised when the number of %s placeholders and data do not match. That means the number of placeholders is
not equal to the number of data.
Package: tracardi-pushover-webhook
Pushover pluginThis plugin sends a message to pushover service.RequirementsTo use this plugin you must register athttps://pushover.netand obtain API_TOKEN and USER_KEY.ConfigurationTHis plugin needs access to resource that will hold the information on PushOver credentials.Resource configuration{"token":"<API_TOKEN from PushOver>","user":"<USER_KEY from PushOver>"}Plugin configuration{"source":{"name":"pushover","id":"<resource-id>"},"message":"Hello {{profile@traits.private.pii.name}}!"}Message can be a template that uses placeholders for data from profile. Above you can
see a simple template that when executed will replace{{profile@traits.private.pii.name}}with name (traits.private.pii.name) from profile.InputThis plugin does not take any inputOutputOutput returns status and response body from PushOver service.{"status":200,"body":{"status":1,"request":"c759f16e-c10a-4066-b91d-05fd06504790"}}
Package: tracardi-rabbitmq-publisher
RabbitMQ publisherThe purpose of this plugin is to publish payload to RabbitMQ.It reads payload and sends it to defined RabbitMQ. RabbitMq must be defined as source in Tracardi.ConfigurationThis node requires configuration.Example configuration{"source":{"name":"RabbitMQ","id":"79c315aa-2780-4742-bc70-6444bf8ea444"},"queue":{"name":"test-test","routing_key":"test","queue_type":"direct","compression":null,"auto_declare":true,"serializer":"json"}}Input payloadThis node reads input payload and sends it to the queue.OutputThis node has no output.
Package: tracardi-regex-validator
String ValidatorThis plugin validates data with regex pattern.ConfigurationThis node requires configuration.validation_regex - this is regex pattern.data - data what we want to validate. this value can also be a path to date in profile, session, event.Examples{"validation_regex":"^H","data":"payload@properties.hello"// This will return e.g. Hello world}It will returnpayloadonvalidoutput port.invalidport will stay inactive.{"validation_regex":"^a","data":"hello!"// Now we use plain string instead of path to data.}It will returnpayloadoninvalidoutput port.validport will stay inactive.InputThis node does not process input payload.OutputThis plugin has to port valid and invalid. Depending on validation result the appropriate ports will be launched with payload copied as data.
Package: tracardi-remote-call
Remote call pluginThis plugin calls remote API.Configuration{"method":"post","url":"http://localhost:80/API","timeout":30,"headers":{"X-Customer-Header":"Header value"},"cookies":{"Cookie-Key":"Cookie value"},"sslCheck":true,"body":{"content":"{\"json\":1}","type":"application/json"}}This configuration defines API url as POST "http://loclhost:80/API" with body{"json":1}.If user requires the body to be sent with GET method than body will be squashed to represent keys and values.For example this JSON:{"payload":{"mobile":"android"},"version":[10,11]}Will be flattened to parameters:payload.mobile=android&version=10&verison=11ResultThis plugin returns either the response (on response port) or and error on error port.Example of valid response{"status":200,"content":"<body>","cookies":{"key":"value"}}
Package: tracardi-smtp-connector
E-mail via SMTPThe purpose of this plugin is to send e-mail using SMTP servers. The plugin supports sending HTML messages.ConfigurationThis node requires configuration.Example of configuration{"message":{"send_to":"to@email.com","send_from":"from@email.com","reply_to":"reply-to@email.com","title":"E-mail subject","message":"My name is {profile@traits.private.pii.name}"},"source":{"id":"resource-id"}}Configuration descriptionto: None, - Choosee-mailrecipientfrom: None, - Choose youre-mailreplyTo: None,- Select to whom the reply should be senttitle: Enter aE-mail subject,message: Enter yourmessage, HTML is allowed as well as message template.MessageMessage can be a Tracardi template. Tracardi templates can merge plain text or HTML with data from profile, event,
or session.Example of Tracardi message templateMy name is {profile@traits.private.pii.name}The{profile@traits.private.pii.name}placeholder will be replaced by data from profile. Path to data istraits.private.pii.name.Resource configurationThis node needs SMTP server credentials that are defined in resources. To access defined credentials you will have to
pass resource id.ResourcesThis node needs access to resource that configures SMTP server credentials:Needed credentials:smtp: smtp.gmail.com, - Choose a smtp serverport: 587, - Select the port on which smtp will runusername: None, - enter your usernamepassword: None, - enter your passwordtimeout: 15Example of resource configuration{"smtp":"smtp.gmail.com","port":587,"username":"enter your username","password":"enter your password","timeout":15}Input payloadThis node does not process input payload.OutputThis node returnstrueif mail was sent orfalseif there was an error.
Package: tracardi-string-operations
String properties and transformationsThe purpose of this plugin is return string properties and some transformations as upper case, etc.ConfigurationThis node requires configuration.You have to provide a path to string that needs to be transformed.{"string":"event@path.to.data"}Input payloadThis node does not process input payload.OutputThis plugin returns anobject with transformed string and all its properties such as: isdigit, isupper, etc.Available properties and transformationscapitalize - Converts the first character to upper casecasefold - Converts string into lower caseisalnum - Returns True if all characters in the string are alphanumericisalpha - Returns True if all characters in the string are in the alphabetisascii - Returns True if all characters in the string are ascii charactersisdecimal - Returns True if all characters in the string are decimalsisdigit - Returns True if all characters in the string are digitsisidentifier - Returns True if the string is an identifierislower - Returns True if all characters in the string are lower caseisnumeric - Returns True if all characters in the string are numericisprintable - Returns True if all characters in the string are printableisspace - Returns True if all characters in the string are whitespacesistitle - Returns True if the string follows the rules of a titleisupper - Returns True if all characters in the string are upper caselstrip - Returns a left trim version of the stringswapcase - Swaps cases, lower case becomes upper case and vice ver satitle - Converts the first character of each word to upper caseupper - Converts a string into upper caselower - Converts a string into lower case
Package: tracardi-string-spliter
String splitter pluginThis plugin split any string with a given delimiterRequirementsno requirementsConfigurationExample:{"string":"a.b.c","delimiter":"."}This configuration will splita.b.cstring into ["a", "b", "c"], using '.' as delimiter.InputThis plugin does not process input.OutputReturns array with splitted values.Example:{"result":["a","b","c"]}
Package: tracardi-string-splitter
String splitter pluginThis plugin split any string with a given delimiterRequirementsno requirementsConfigurationExample:{"string":"a.b.c","delimiter":"."}This configuration will splita.b.cstring into ["a", "b", "c"], using '.' as delimiter.InputThis plugin does not process input.OutputReturns array with splitted values.Example:{"result":["a","b","c"]}
Package: tracardi-string-validator
String Validator ActionThe purpose of this plugin is to validate data. We need to specify a type of validation.We can choose from:email - for exampleexample@mail.comurl - for example tracardi.comipv4 for example 192.168.1.1date for example 01.01.1900time for example 01:01int for example 3float for example 3.4number_phone for example +48123456789ConfigurationThis node require configuration.Configuration valuesvalidate_regex - type of validation.data - the string that we would like to validateDatacan be a dotted notation path to value inside profile, event, session, etc. or any string.Examples{"validate_regex":"url","data":"profile@traits.private.email"}It will returnpayloadonvalidoutput port.invalidport will stay inactive.{"validate_regex":"email","data":"12341232"}It will returnpayloadoninvalidoutput port.validport will stay inactive.Input payloadThis node does not process input payload. Input payload will not be returned on output.OutputThis plugin has to port valid and invalid. Depending on validation result the appropriate ports will be launched with payload copied as data.