Saravanan666/pypi-org huggingface dataset:
Package: cubicweb-relationwidget
SummaryThis cube provides a generic but ergonomic widget to link an edited
entity to several others for a given relation. It provides:a list of checkbox-(de-)selectable related entitiesa mecanism to trigger the display of a pop-up window for each possible
target entity type of the relationin the pop-up window, the end-user can:search (using facets) entities to be linked to the edited entity,display (in a paginated table) and select them (using a checkbox on
each table line)create a new entity to be linked (can be desactivated)UsageSelect the relation widget for your relationYou can use the two following mecanisms to configure the user interface:eithercubicweb.web.uihelper.FormConfig:from cubicweb.web import uihelper
from cubes.relationwidget.views import RelationFacetWidget

class MyEntityConfig(uihelper.FormConfig):
      etype = 'MyEntity'
      # Move `my_relation` into the attribute section:
      rels_as_attrs = ('my_relation', )
      # Edit `my_relation` using RelationFacetWidget:
      widgets = dict(
          my_relation=RelationFacetWidget,
      )or directly viauicfg.autoform_field_kwarg:from cubicweb.web.views import uicfg
from cubes.relationwidget.views import RelationFacetWidget

# edit the relation as attribute.
uicfg.autoform_section.tag_subject_of(
    ('MyEntity', 'my_relation', '*'),
    formtype=('main', 'muledit'), section='attributes')

# add the RelationFacetWidget for `my_relation`
uicfg.autoform_field_kwargs.tag_subject_of(
    ('MyEntity', 'my_relation', '*'), {'widget': RelationFacetWidget})Configure it (optional)If you want to desactivate the ability to create a new entity to be
linked to the edited one, you can do it:for a single relation using uicfg again:uicfg.autoform_field_kwargs.tag_subject_of(
('MyEntity', 'my_relation', '*'),
{'widget': RelationFacetWidget(no_creation_form=True)})application-wide by overridingSearchForRelatedEntitiesView.has_creation_formto always return False:from cubes.relationwidget.view import SearchForRelatedEntitiesView

class MySearchForRelatedEntitiesView(SearchForRelatedEntitiesView):

    @property
    def has_creation_from(self):
        return False

def registration_callback(vreg):
    vreg.register_and_register(MySearchForRelatedEntitiesView,
                               SearchForRelatedEntitiesView)There is also adialog_optionsdictionary that can be used to
configure the bootstrap modal window (seehttp://getbootstrap.com/javascript/#modals-options):uicfg.autoform_field_kwargs.tag_subject_of(
('MyEntity', 'my_relation', '*'),
{'widget': RelationFacetWidget(dialog_options={'keyboard': False})})
Package: cubicweb-rq
Cube for starting RqJobs on a Rq workerInstallationOpen the project in a terminal and run:pip install -e .This will install the cube in your active virtual environment
ascubicweb-rq.The following sections indicate additional steps when you
install this cube as a dependency or as an instance.As a dependencyIf you plan to use this cube as a dependency for your own cube,
add it to your__pkginfo__.pyas follows:__depends__ = {
    # ... Your previous dependencies
    "cubicweb-rq": None,
}If the target cube is already used as an instance, you need to migrate it
with the help of its python shell (replaceYOUR_INSTANCE_NAMEby your instance name):cubicweb-ctl shell YOUR_INSTANCE_NAMEIn the python prompt, enter the following command:add_cube("rq")PressCtrl-Dthen restart your instance.
The cube should now be available in your instance.As an instanceIf you plan to use this cube directly as an instance, create and start
your instance with the following commands (replacecubicweb-instanceby the name of your choice):cubicweb-ctl create rq cubicweb-instance
cubicweb-ctl start -D cubicweb-instanceLearn MoreVisit theofficial documentationto learn more about CubicWeb.Launch a workerHave redis installed and running on your machine.$ sudo apt-get install redis-server
$ sudo system-ctl start redisIn your~/etc/cubicweb.d/cubicweb-instance/pyramid.inifile,
add the following linesredis.sessions.timeout = 1200
redis.sessions.secret = stuff
redis.sessions.prefix = cubicweb-instance:
redis.sessions.url = redis://localhost:6379/0
rq.redis_url = redis://localhost:6379/0Launch a worker with the following command line (replacecubicweb-instancewith the name of your cubicweb instance):cubicweb-ctl rq-worker cubicweb-instance
Package: cubicweb-rqlcontroller
SummaryController that gives users rql read/ write capabilities. To have token
authentication, installcubicweb_signedrequest.Sample usageUsers of this service must perform a HTTP POST request to its endpoint,
that is the base url of the CubicWeb application instance appended with
the “rqlio/1.0” url path.The posted data must use theapplication/jsonormultipart/form-data.
For theapplication/jsonMIME type, the posted data must contain a list of
pairs of the form(rql_string, rql_args), where:rql_stringis any valid RQL query that may contain mapping keys with
their usual formrql_argsis a dictionary, whose keys are the mapping keys fromrql_string, and the values can be:actual valuesstring references to a previous RQL query’s result, with the
assumption that the referenced RQL query returns a single line and
single column rset; under such conditions, a string reference
must be “__rXXX” whereXXXis the (0-based) index of the RQL query in
the json-encoded list of queries.The HTTP request’s response (in case where there is no error), is a
json-encoded list.  Its length is the number of RQL queries in the request,
and each element contains the json-encoded result set rows from the
corresponding query.In case of an error, a json object with areasonkey will explain the
problem.Python client example using python-requests:import requests
import json

args = [('INSERT CWUser U: U login %(l)s, U upassword %(p)s',
        {'l': 'Babar', 'p': 'cubicweb rulez & 42'}),

       ('INSERT CWGroup G: G name "pachyderms"', {}),

       ('SET U in_group G WHERE U eid %(u)s, G eid %(g)s',
        {'u': '__r0', 'g': '__r1'})
       ]

resp = requests.post('https://myinstance.example.com/rqlio/1.0'),
                     data=json.dumps(args),
                     headers={'Content-Type': 'application/json'})
assert resp.status_code == 200
Package: cubicweb-s3storage
SummaryA Cubicweb Storage that stores the data on S3.It is a standardCubicwebStorage, similar to theBytesFileSystemStorage. For
example, if you want to store File.data payloads in S3, you should create an
S3Storage instance, typically in a startup hook, as:from cubicweb.server.hook import Hook
from cubicweb_s3storage.storages import S3Storage

class S3StorageStartupHook(Hook):
    __regid__ = 'mycube.server-startup-hook'
    events = ('server_startup', 'server_maintenance')

    def __call__(self):
        storage = S3Storage('s3_bucket')
        self.repo.system_source.set_storage('File', 'data', storage)By default, S3 object keys (ie. S3 object identifiers) are random UUID
generated at entity creation time. If you want to implement another key
generation algorithm, you must write overloadS3Storage.new_s3_key()method.Communications with AWS are handled byboto3.WarningThere is no cache, for now, so every time you read an entity
attribute that is stored on S3, it will be downloaded from bucket provider.ConfigurationThe S3Storage class constructor needs an S3 bucket name.If you want to put your aws credentials in an other file than the default
(~/.aws/credentials), you must set theAWS_CONFIG_FILEenvironment
variable.If you want to use another profile name thandefault, set theAWS_PROFILEenvironment variable.If you prefer to configure AWS credentials by environment variables
(eg. when using docker), you can use the following variables:AWS_ACCESS_KEY_ID: the access key for your AWS account,AWS_SECRET_ACCESS_KEY: the secret key for your AWS account.Please readboto3 documentationfor more details.Further configurationIn some cases you might want to use compatible S3 storage which is not on
AWS.For this you have the following variables :AWS_S3_ENDPOINT_URL: endpoint url for your alternative S3 storageThis enables the use of aminio server, seetheir documentation about endpoints.Note : this type of variablehas been requested upstream(and relatedaws-cli).
Package: cubicweb-saml
SAML2 authentifier for cubicweb. This cube allow to authenticate from a SAML2
provider with cubicweb login form.InstallationThe first step is to install cubicweb-saml into your python environment:pip install cubicweb-samlTo add this cube into your cubicweb instance:cubicweb-ctl shell <your_app>
>>> add_cube('saml')
>>> exitTo generate SAML related option in all-in-one.conf:cubicweb-ctl upgrade <your_app>ConfigurationTo configure cubicweb-saml metadata, opensources.conffrom cubicweb
instances folder (by default$HOME/etc/cubicweb.d/<instance>):[SAML]

# SAML v2 metadata uri which can be read from a file (file://<absolute_path>)
# or retrieved from a specific URL(http[s]://...)
saml-metadata-uri=

# The globally unique identifier of the entity.
saml-entity-id=To configure cubicweb-saml options, openall-in-one.confin the same
directory:[SAML]

# Don't verify that the incoming requests originate from us via the built-in
# cache for authn request ids in pysaml2
saml-allow-unsolicited=yes

# Indicates if the Authentication Requests sent by this SP should be signed by
# default.
saml-authn-requests-signed=no

# Indicates if this entity will sign the Logout Requests originated from it.
saml-logout-requests-signed=yes

# Indicates if this SP wants the IdP to send the assertions signed. This sets
# the WantAssertionsSigned attribute of the SPSSODescriptor node of the
# metadata so the IdP will know this SP preference.
saml-want-assertions-signed=yes

# Indicates that Authentication Responses to this SP must be signed. If set to
# True, the SP will not consume any SAML Responses that are not signed.
saml-want-response-signed=no

# Allow to register a new user
# if this one does not exist in current database.
saml-register-unknown-user=no

# Set the default group to register new user
# if the saml-register-unknown-user option was activated.
saml-register-default-group=guests

# Set the default password system to use if the saml-register-unknown-user
# option was activated (available values: empty, random).
saml-register-default-password=empty
Package: cubicweb-searchui
SummarySet of ui components to ease data browsing.Setup the SearchUi componentInstall the dependencies:npm installThen build the css and js filesnpm run buildFor the dev environment:npm run watchCustom facetsRelationSwitchFacetThis facet examines current rset and selected variable and displays a
list of relations that can be traversed from the selected
variable. When the user clicks on one of those relations, he gets
redirected to the resulting page.For instance, if the original RQL is:Any X WHERE X is CWUserthen the facet displays (among other relations) in_group and in_state
relations. The corresponding RQL for those relations is:Any G WHERE X is CWUser, X in_group G
Any S WHERE X is CWUser, X in_state SThis facet therefore differs from other facets in that it chagnes the
RQL selection (on the left of the WHERE).NOTE:while this original implementation is based on facets,
it may not be the best choice, considering its behaviour
differences:it changes the left part of the WHERE,the user gets redirected to another page,the facet is not reloaded with standardadd_rql_restrticions()andpossible_values()API calls but is completely regenerated
when the facets-content-loaded event is triggered.
Package: cubicweb-seda
This cube implements theSEDAstandard for CubicWeb. It has been funded by theSIAFand theSAEM project.Project is hosted athttps://www.cubicweb.org/project/cubicweb-seda/and source
code athttps://hg.logilab.org/master/cubes/seda.To launch the tests:python -m toxTo generate the documentation:python -m tox -e docPart of the code is generated from SEDA 2’s XSD schema. If you update the schema
or code generator (on of thecubicweb_seda/xsd*.pyfiles), to update the
generated code type:python -m tox -e make
Package: cubicweb-semnews
SummaryCube for news storage and analysisThis cube provides an implementation of Semnews:store news articles and tweets.extract and synthetize information.provide semantic useful and original visualisation.analytics tools and datamining/machine learning processings.InstallationCreation of the instance:Create an instance using: cubicweb-ctl create semnews <name-of-instance>Create the instance’s database using: cubicweb-ctl db-create <name-of-instance>Add articles sourcesSource of articles could be created using:Blogs/RSS feeds:session.create_entity('CWSource', name=<name of the source>, type=u'datafeed',
                      parser=u'rss-parser', lang=<lang of the source>,
                      url=<url of the blog/rss feed>,
                      config=u'synchronization-interval=120min')Tweet:session.create_entity('CWSource', name=<name of the source>, type=u'datafeed',
                      parser=u'tweet-parser', lang=<lang of the source>,
                      url=<url of the blog/rss feed>,
                      config=u'synchronization-interval=120min')The synchronization interval could be setted to a more specific value, or setted to “no” for manual synchronization
only.Semnews comes with some predifined blogs/tweets/rss feeds:Some french political blogs. You can add them using:cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_blogs_fr.pySome international english newspapers. You can add them using:cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_newspapers.pySome french newspapers. You can add them using:cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_newspapers_fr.pySome french politician tweets. You can add them using:cubicweb-ctl shell <name-of-instance> <path-to-cube-code-source>/migration/examples_twitters_fr.pyAdd Named Entities sourcesSemnews is based on a named entities process, that you have to define:session.create_entity('NerProcess', name=<name of process>, host=<appid or sparql endpoint url>,
                      type=<rql or sparql>, lang=<optional lang of the ner source>,
                      request=<request to be performed>)See the document of the NER cube for more details.
Example of source:session.create_entity('NerProcess', name=u'dbpedia38-en', host=u'ner',
                      type=u'rql', lang=u'en',
                      request=u'Any U WHERE X label %(token)s, X cwuri U, '
                               'X ner_source NS, NS name "dbpedia38-en"')CommandsSemnews provide to commands:A command to extract named entities from articles:cubicweb-ctl process-ner <name-of-instance>A command to cleanup recognized entities according to some Dbpedia categories
(see entities/external_resources.py):cubicweb-ctl cleanup-ner <name-of-instance>
Package: cubicweb-sentry
# CubicWeb-Sentry## SummaryThis cube add support of [Sentry](https://sentry.io/) for [CubicWeb](https://www.cubicweb.org/). It is a plug-in for the framework.## Install itpip3 install cubicweb-sentryadd_cube(“sentry”).## Configure itSee~/etc/cubicweb.d/<instance-name>/all-in-one.conf
Package: cubicweb-signedrequest
SummaryThis cube allows a client to forge signed HTTP resquests that are then
recognized as valid by the CubicWeb web server, ie. the request is
handled as an authenticated user. For example, it can be used to start
an operation using an authenticated user.It’s usually used alongside withcubicweb-rqlcontrollerandcwclientlib.This cube aims at make it easy to write REST-like APIs for CW.Long story short:cubicweb-signedrequestallows you to make
authenticated HTTP requests simply by addind a properly forged HTTP
header in your request.Warningcubicweb-signedrequestisveryticklish about time:
your request will be refused is theDateheader if
not very accurate. Also, for security reasons, you won’t
have any detail on why your request has been denied.How to use signed HTTP requests in your CubicWeb app?This cube aims at making it possible to use tokens to authenticate to
a CubicWeb application. It provides a Token entity that have a uniquetoken_idattribute and a generated (secret) token. ThisTokenentity is related to aCWUser(using thetoken_for_userrelation).It’s the possible to make authenticated HTTP requests (authenticated
as this CWUser) by adding aAuthorizationheader to the HTTP
request. This header is computed as a HMAC hash with:the secret token as key,the concatenation osmethod+url+ all the signed headers.By default, themethodis theCubicwebstring, and the signed
headers are ‘Content-SHA512’, ‘Content-Type’ and ‘Date’.Thedoc/sreq_example.pyscript is an simple python script showing how to
forge such a HTTP GET request usingurllib2.Please read the documentation ofcwclientlibfor examples of how it
can be used.
Package: cubicweb-slickgrid
SummaryTable view rendered using theSlickGridlibrary.SlickGrid is an advanced JavaScript grid/spreadsheet component.This view accepts any non-empty rset. It uses introspection on the
result set to compute column names and the proper way to display the
cells.It is highly configuration and accepts the same wealth of option than
cubicweb.web.view.tableview.RsetTableView.ExampleTo try it at the speed of lightOnce your instance is running you can go to:http://localhost:8080/view?rql=Any L, X WHERE X is CWUser, X login L&vid=slickgridThat’s all. The rendered table uses the ‘slickgrid’ view.Calling the slidgrid from your viewsThe simplest way is to call:self._cw.wview('slickgrid',rset,'null')Options can be specified by class attributes:displaycols, if notNone, should be a list of rset’s columns to be
displayed.headers, if notNone, should be a list of headers for the table’s
columns.Nonevalues in the list will be replaced by computed column
names.cellvids, if notNone, should be a dictionary with table column index
as key and a view identifier as value, telling the view that should be
used in the given column.As well asSlickGridspecific option:columns_options: a dictionary of SlickGrid column optionsOne can use:classMyRsetGridView(RsetGridView):__regid__='myslickgrid'headers=(_('first'),_('second'),_('third'))cellvids={0:'text',1:'inline',2:'outofcontext'}columns_options={0:{'sortable':False}}self._cw.wview('myslickgrid',rset,'null')Note that the pagination is not working yet.
Package: cubicweb-subprocess
SummaryThis cube helps to manage and monitor subprocesses.DescriptionThis cube provides an easy way to run subprocesses using a dedicated
workflow.Subprocesses can be configured (command line, environment, working
directory).To start the subprocess, one just has to fire the ‘start’ transition.The standard outputs (stdout and stderr) are stored into the database
asFile. The outputs are updated each time the subprocess writes
data into the stream.The subprocess can update theadvance_ratioto inform the user
about the process advancement.Once the subprocess finishes, thecompleteorfailtransition
is fired automatically.The subprocess can be killed using thekilltransition.
Package: cubicweb-tag
SummaryThe tag cube allows to add labels to an entity as a simple yet
powerful way to classify your content. Tags can be used to refine a
search using facets.It is a CubicWeb component. CubicWeb is a semantic web application
framework, seehttp://www.cubicweb.orgInstallAuto-install from sources is preferred withpip/Distribute:pip install cubicweb-tagIf you have troubles, useeasy_install/setuptoolsand eggs:easy_install cubicweb-tagYou can install the package manually from the uncompressedtarball:python setup.py install # auto-install dependenciesIf you don’t want the dependencies to be installed automatically, you
can force the setup to use the standard librarydistutils:NO_SETUPTOOLS=1 python setup.py installMore details athttp://www.cubicweb.org/doc/en/admin/setupUsageTo allow tags on an entity type, you must allow thetagsrelation betweenTagand your entity type(s).For instance to activate the tag functionality on Person, Company and Division
entity type, one should add to his schema:fromyams.buildobjsimportRelationDefinitionclasstags(RelationDefinition):subject='Tag'object=('Person','Company','Division')You should then see the tags box appearing on the primary view for entities of
those type. The`TagsBox` display tags applied to the entity but also provides
an easily way to add / remove tags, if you’ve the permission to do so.More viewsTheSimilarEntitiesBoxshows some entities which share the most tags togetherTheTagsCloudView, a classical, displaying a set of tags appearing more or
less big according to the number of tagged entities. It’s used by theTagsCouldBox, which is not visible by default (user can activate it using
their preferences)  but that you can activate by default using the code snippet below:fromcubicweb_tag.viewsimportTagsCloudBox# make the tags cloud box visible by defaultTagsCloudBox.visible=TrueThe primary view for tags provides a tags merging interface to site administrators,
very useful to manage tags on a site where people tend to express the same thing with
different words, or spelling.DocumentationLook in thedoc/subdirectory or readhttp://www.cubicweb.org/doc/en/
Package: cubicweb-tagsinput
SummaryProvideshttps://github.com/timschlechter/bootstrap-tagsinputbased widgetsTagsInputBaseBase class for tagsinput widgetsitemhtml_view_regidregid of the view that will be used to render the entity in a tag.optionsDefault options given to the tagsinput component.ObjectTagsInputUsable with RelationFieldWill preload all the possible target values.LazyRelationWidgetUsable with RelationFieldDynamicaly search for target entities using the ‘has_text’ relation.Both widgets make use of a ‘tagsinput.itemhtml’Releases0.2.1Fix the ObjectTagsInput widget.0.2Add a ‘options’ argument to the widgets constructor. It must be a
dictionnary that will be given as initialisation arguments to the
javascript constructor.Set the tabindex of the input according to the original input one.Add a small doc0.1Initial release
Package: cubicweb-tracker
SummaryThetrackercube provides a basic issue tracker with projects, tickets and
versions to group tickets. It can be used out-of-the box but is targeted as a
base for more featurefull forges or configuration management systems, such as
theforgecube.You can for instance:defines roadmap for a project by planning future versions.see A link to subscribe to rss feed for published versions of project on each
project toolbar.…UsageProjectRoadmapView, displays all versionProjectStatsView, displays the number of tickets for each status
(‘done’, ‘validation pending’, and so on)CreditsThe included Entypo font have been created by Daniel Bruce (www.entypo.com) as
proposed by fontello (https://github.com/fontello/entypo).
The Entypo pictograms are licensed under CC BY 3.0 and the font under
SIL Open Font License.
Package: cubicweb-trustedauth
This cube provides an authentication plugin which ensures proper
authentication of users behind a trusted reverse proxy (eg. Apache +
mod_ssl + mod_auth_kerb).The idea is that if the CubicWeb application is behind a reverse proxy
that is responsible for authenticating users, the CubicWeb application
do trust this latter when it says the user is authenticated as
‘user’. This information is simply passed from the reverse proxy to
the CubicWeb application by an entry in the HTTP header.It is non-obstrusive and easy to plug.The typical usage is to implement a simple kerberos based
authentication mecanism.