Saravanan666/pypi-org huggingface dataset:
Package: serious-django-permissions
https://github.com/serioeseGmbH/serious-django-permissionsserious-django-permissions is a Django extension that makes it possible to define Permissions in each app,
and Groups in a central place. It makes these Permissionsimport-able and checkable viauser.has_perm:from some_app.permissions import ChangeSomethingPermission

def change_something(something, user):
    if not user.has_perm(ChangeSomethingPermission):
        raise PermissionDenied("You can't change this something.)
    else:
        return something.change()Both permissions and groups can then be created in the database with a singlemanage.pycall (see Quick start below).Quick startInstall the package with pip:pip install serious-django-permissionsAdd “serious_django_permissions” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'serious_django_permissions',
]Addserious_django_permissions.permissions.PermissionModelBackendto yourAUTHENTICATION_BACKENDSsetting. This enables you to do permission checks likeuser.has_perm(SomePermission):AUTHENTICATION_BACKENDS = [
    ...
    'serious_django_permissions.permissions.PermissionModelBackend',
]In each app that should define a permission, importserious_django_permissions.permissions.Permissionand create subclasses of it.The name of your subclasses must end inPermission, and each subclass must define adescriptionattribute. For instance, let’s say you have the filemyapp/permissions.py:from serious_django_permissions.permissions import Permission

from .models import MyModel

class MyPermission(Permission):
    model = 'MyModel' # should be a model inside myapp.models, or not defined for global permissions.
    description = 'A description for this permission'Runpython manage.py create_permissionsto create all defined permissions on the database level.New in version 0.7:Create all permissions (including groups) programmatically by callingsetup_permissions():from serious_django_permissions.helpers import setup_permissions

setup_permissions()If you’d like to use the Groups feature as well:Create a file named something likesome_app/groups.pyinside one of your apps, or in the folder where your settings live. An example:from serious_django_permissions.groups import Group

from app_one.permissions import\
    AppOnePermissionA, AppOnePermissionB
from app_two.permissions import\
    AppTwoPermission

class GroupA(Group):
    permissions = [
        AppOnePermissionA,
        AppTwoPermission
    ]

class GroupB(Group):
    permissions = [
        AppOnePermissionB,
        AppTwoPermission
    ]Reference the defined groups file in your settings:DEFAULT_GROUPS_MODULE = 'some_app.groups'Runpython manage.py create_groupsto create all permissions and assign them to the groups.AuthorizationSetting a permission for a model does not automatically restrict the access to the model.
Authorization still has to be checked via the view. Check theDjango documentation on how to authorize access to viewsfor further information.
Package: serious-django-services
https://github.com/serioeseGmbH/serious-django-servicesserious-django-services defines a Service pattern for Django.What a Service does is abstracting operations (first and foremost: operations on models)
and their business logic away from endpoints, so you can reuse business logic both for your
API, your Graphene endpoints, and your classic HTML Django Views.Each Service also definesservice_exceptions, a list of exceptions that it specifically
can throw. If you don’t have any of those for your serivce, make sure to just setservice_exceptions = [].
Otherwise you’ll get an error on the definition of the class, to enforce being explicit about which
exceptions your Service can throw.In this package, we just define aServicebase class that you need to inherit to write your own
services. Here’s a toy example:class WeAreClosedException(Exception):
    pass

class OrderTakeoutService(Service):
    service_exceptions = (WeAreClosedException,)

    @classmethod
    def create_order(cls, customer, item_no):
        if datetime.datetime.now().hour > 22:
            raise WeAreClosedException("Sorry, we're closed after 10pm.")
        if not customer.has_perm(PermissionToOrder):
            raise PermissionDenied("Sorry, you can't order right now.") # when someone was too rude
        order = Order.objects.create(customer=customer, item=item_no)
        return orderNow you can keep this business logic local to this service, and use it anywhere you might need to
create an order. For instance, in a Graphene mutation:class OrderTakeoutMutation(graphene.Mutation):
    class Arguments:
        item_no = graphene.String()

    success = graphene.NonNull(graphene.Boolean)
    error = graphene.String()
    order_no = graphene.ID()

    def mutate(self, info, item_no):
        # get_user_from_info() is from `serious-django-graphene`
        customer = get_user_from_info(info)
        try:
            order = OrderTakeoutService.create_order(customer, item_no)
        except OrderTakeoutService.exceptions as e:
            return OrderTakeoutMutation(success=False, error=str(e))

        return OrderTakeoutMutation(success=True, order_no=order.pk)You can then do something very similar for a REST API or a Django View. And none of your view-level
logic needs to ever know about your closing hours or that some customers can be banned from ordering.Quick startInstall the package with pip:pip install serious-django-servicesAdd “serious_django_services” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'serious_django_services',
]Importserious_django_services.Serviceand subclass it for each Service you want to define.Define the operations you need on your service, each as a@classmethod.Use your Service’s operations in your view-level code.
Package: seriousity
SeriousitySerious tool for serious people. I'm serious.Getting startedFor serious people there should be serious software. That's why we are here. ByweI meanI. Because serious people are always alone.PrerequisitesBefore you start installation you should:Install Python 3.xInstall pipBut the main prerequisite -BE SERIOUS. It is important.InstallationCATION: you need to be completely serious while installation. DON'T SMILE🧐 Serious people don't smile. You smile, you die. That's the law.When get serious, type this in your terminal:pipinstallseriousityIt should install seriousity on your machine. It was seriously tested so if you got an error thenyou was not serious enough while installation. That's the case. Errors are not for serious people.UsageIf you seriously weighed the pros and cons then you should become incredibly s-s (i.e. serious, abbreviations are for s-s people). So you ready to start your serious business. The command is below. Good luck.seriousitystartseriouslyLicenseSerious people don't use licenses. They are licenses themselves. SeeLICENSE.mdif you don't trust me.
Package: serious-scaffold
Serious Scaffold PythonA development-focused Python project template with various integrations, configurations and modules.[!WARNING]Serious Scaffold Pythonis in theAlphaphase.
Frequent changes and instability should be anticipated.
Any feedback, comments, suggestions and contributions are welcome!Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring lint, test and documentation, as well as implementing settings, logging and other frequently used modules.Serious Scaffold Pythonstreamlines this process. Powered bycopier, bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template.If you find this helpful, please considersponsorship.🛠️ FeaturesProject setup and template update withcopier.Managevirtual environmentsfor development withpipenv.Manage dependency with categorizedrequirementsandconstraints.Automate Git hooks withpre-commit hooksandlocallinters.Lint withblack,isort,mypy,ruff, andtoml-sort.Test withpytestandcoveragefor threshold and reports.Document withsphinx, thefurotheme, andmypy/coveragereports.Version the package using git metadata withsetuptools-scm.Continuous Integration withGitHub ActionsandGitLab CI/CD.Versioned documentationwithRead the Docsintegration.Develop Command Line Interfaces withtyper.Manage configurations withpydantic-settings.Centralize common actions with a unified Makefile.VSCode settings with recommended extensions.🔧 PrerequisitesCertain system-level Python applications are needed and it is recommended to usepipxto install and run them in isolated environments. Refer to pipx's installation instructionshere. Oncepipxis set up, install the necessary tools using the following commands.# Copier: Template rendering for projects.pipxinstallcopier# Pipenv: Virtual environment and package manager for Python.pipxinstallpipenv# Pre-commit: Automates Git hooks for code quality checks.pipxinstallpre-commit🚀 QuickstartGenerate the project.copiercopygh:serious-scaffold/serious-scaffold-python/path/to/projectNavigate to the project directory and initialize a git repository.cd/path/to/project
gitinitSet up the development environment.makedevCommit the initialized project.gitadd.
gitcommit-m"Initialize from serious-scaffold-python."That's it! Feel free to focus on the coding withinsrcfolder.🛡 BadgeBadge for markdown:[![Serious Scaffold Python](https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json)](https://serious-scaffold.github.io/serious-scaffold-python)Badge for restructuredtext:..image::https://img.shields.io/endpoint?url=https://serious-scaffold.github.io/serious-scaffold-python/_static/badges/logo.json:target:serious-scaffold.github.io/serious-scaffold-pythonIt will look like this:📜 LicenseMIT License, for more details, see theLICENSEfile.
Package: serious-serializers
Serious SerializersSimple class mixin to add YAML serialization and deserialization to dataclass
objects that use slots.ExamplesTo add serialization to dataclass object:fromserious_serializersimportSlotsSerializer@dataclass(slots=True)classData(SlotsSerializer):n:intdata:List[float]To represent the class tag as!Data:fromserious_serializersimportSlotsSerializer@SlotsSerializer.show_tag@dataclass(slots=True)classData(SlotsSerializer):n:intdata:List[float]
Package: serius
Gamer Serius: Microservice Docker DNS for Local LinuxAtGAMER, we use Serius to address Docker IP
recognitions in local Linux for each service. Serius will map a Docker
IP for each service to one service domain name for the Linux.RequirementsPython version 3.6+Allowance of Docker Remote API for each microservice Docker hostRoot access to your local LinuxConfigurationswatchInterval - time in seconds to watch service DockerswatchType - type to watch (docker or rancher)Service SectiondockerHost - a service Docker host IPdockerPort - a service Docker host portimage - a service Docker imageInstalling SeriusTo install Serius to your projects, you have to run pip install:$pipinstallseriusHow to use Serius?$serius-cserius.conf.json-c is for a Serius config file.LicenseSerius is MIT Licensed.
Package: serl
Serl - A tool for creating and using languagesSerl (serialized languages) is a format and corresponding command line tool for creating and using textual domain specific or markup languages with arbitrary syntax. This is achieved through the concept of language configurations, which are YAML files for specifying language syntax and functionality, used by the tool to execute language programs. These configurations can then be linked, allowing languages to be used like any other command line tool.Documentation can be found onRead The Docs.Development WorkflowCommandDescriptionpip install .Build/install locallyserl helpShow the tool command line help screenpytest testsortest.batRun automated test suitepy -m buildBuild distributionpy -m twine upload dist/*Upload distributionsphinx-build -b html docs/source/ docs/build/htmlBuild documentationMIT LicenseCopyright (c) 2023 Harry DowningPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: serlist
OverviewSERList is used to scrape the information from a search engine results page including:titlelinkdescriptionNow, SERList can well deal with the results from these search engines without setting anything (e.g. XPath):GoogleYahooBingYandexBaiduSogou360 SearchInstallationInstall using pip:pip install serlistBasic UsagefromserlistimportSerpScraperSerpScraper().scrape(text)The variabletextis the HTML text of a search engine results page.Documentationhttps://serlist.readthedocs.io/
Package: sermepa
Sermepa clientA python client library for sending payment orders to the Sermepa/RedSys payment service.InstallationFrom pypi.orgpipinstallsermepaFrom source:pipinstall.Running tests$./setup.pytestIf you want to test your own keys create fileconfig.pywith:# This one should be your private oneredsys=dict(merchantcode='123456789',merchantkey='blablablablablablablablablabla',)# This is a common one but you can have your own test keyredsystest=dict(# Clave para testsmerchantcode='999008881',merchantkey='sq7HjrUOBfKmC576ILgskD5srU870gJ7',)Changelogsermepa 1.0.4-devWhen sermepa revice an unexpected param indecodeSignedDatamethod not will raiseSignatureErrorsermepa 1.0.2 (2020-09-16)AcceptDs_ProcessedPayMethodparameter setsermepa 1.0.1 (2020-06-16)Packaging issues to upload onto pipysermepa 1.0.0Suport for Python3Breaking change: all input and output strings of the library are expected to be unicode, not bytesTo ease transition whenever a parameter is sent as bytes, utf8 decoding is enforcedAcceptDs_Merchant_Cof_Txnidparameter setsermepa 0.1.3AcceptDs_Card_Typeparameter setAcceptDs_Card_Brandparameter setAcceptDs_ErrorCodeparameter setsermepa 0.1.2Adapted to the new 256 encryption schemaFull unittestingSpecification tables copied into codesermepa 0.1.1First version by GisceTODOAccept all new parameters in specificationRecover pypi projectReview error handlingProduction api test should depend on the concrete key
Package: sermonaudio
SermonAudio.com API Client LibraryThis is the official Python client library for accessing the latestSermonAudio.comAPIs.For documentation on the SermonAudio API, head toapi.sermonaudio.com. Proper Python type
conversions have been made where appropriate (for example, dates are converted
todatetime.dateobjects). API functions are grouped into modules by API
family, just as in the main documentation (so Node API endpoint helpers are
in thenodemodule). Endpoint request methods are given an appropriate
prefix such asget.Detailed documentation is included with each method. If you have any questions
about how to use these methods, or feel the docstrings could be improved,
send a message todeveloper@sermonaudio.com.Installation NotesThis library is written in Python 3.6+. Please ensure that you have the latest
version of OpenSSL installed. If you are on a Mac, you may need to usehomebrewto install a new verison of python linked against
the updated version viabrew install python3 --with-brewed-openssl.
Unfortunately, older versions of OpenSSL do not support TLSv1.2. Older versions
have known security holes, so our server will refuse such connections.
Make sure to use the new (brewed) version of python for your virtual environment.QuickstartThe API functions are straightforward. All API methods validate the response
from the server, and return a logical value from the wrapped response, or throw
an exception. For example, a node that returns a single result will return only
the first item in the results list, if one exists. Additionally, the object(s)
returned are mapped to the correct type of object. Here are some code samples
to get you started.import sermonaudio

from sermonaudio.node.requests import Node

# You must set your API key before making any requests
sermonaudio.set_api_key('YOUR-API-KEY')

sermon = Node.get_sermon('261601260')
# TODO: Something with this sermon

for sermon in Node.get_sermons(broadcaster_id='faith').results:
    # TODO: Something with each sermon in the list
    passAll methods have docstrings, so you can refer to this documentation as you
write your application. We do encourage you to read the full documentation
referenced above for the most complete, up to date details.LocalizationThis client library provides some support for localization. It uses the os LANGUAGE
environment variable to determine the default language for client requests. You can override
the preferred language either globally or per-request. You can override it globally
using the top-levelset_preferred_languagefunction. All request methods also accept apreferred_language_overridekeyword argument so you can override the desired language for
individual requests. The locale values are passed via the HTTPAccept-Languageheader,
and should follow that format. For example,en-USfor US English.User AuthenticationThis library has some initial support for our user API's. It supports both cookie-based and
Authentication header-based token authentication. A basic example using cookie-based
authentication:# Perform login
User.login(username, password)

# Retrieve user details
user = User.get_user()
Package: sermon-audio
# Sermon Audio APISermon Audio API is a python wrapper for the APIs of ([http://www.sermonaudio.com/api](http://www.sermonaudio.com/api))## Installpip install sermon-audio## Usage#### Get Speakers By Member Idfrom sermonaudio import SermonAudioAPIspeakers = SermonAudioAPI.get_speakers_by_member_id(member_id=’communitybapt’)print speakers#### Get Sermon Listfrom sermonaudio import SermonAudioAPIapi = SermonAudioAPI(‘username’, ‘password’)# There are only a few categories you can search for:
#     speaker
#     eventtype
#     series
#     yearsermons = api.get_sermon_list(category=’year’, search_term=’2013’)print sermons#### Get Sermon Infofrom sermonaudio import SermonAudioAPIapi = SermonAudioAPI(‘username’, ‘password’)sermon = api.get_sermon_info(sermon_id=’328131022290’)print sermon#### Newest Sermons By Speakerfrom sermonaudio import SermonAudioAPIsermons = SermonAudioAPI.newest_sermons_by_speaker(speaker=’David Whitcomb’)print sermons#### Newest Sermons By Member Idfrom sermonaudio import SermonAudioAPIsermons = SermonAudioAPI.newest_sermons_by_member_id(member_id=’communitybapt’)print sermons#### Get Event Typesfrom sermonaudio import SermonAudioAPIevent_types = SermonAudioAPI.get_event_types()print event_types#### Get Languagesfrom sermonaudio import SermonAudioAPIlanguages = SermonAudioAPI.get_languages()print languages#### Get Newest Series By Member Idfrom sermonaudio import SermonAudioAPIseries = SermonAudioAPI.get_newest_series_by_member_id(member_id=’communitybapt’)print series#### Get Series By Member Idfrom sermonaudio import SermonAudioAPIseries = SermonAudioAPI.get_series_by_member_id(member_id=’communitybapt’)print series#### Get Speakers By Keywordfrom sermonaudio import SermonAudioAPIspeakers = SermonAudioAPI.get_speakers_by_keyword(keyword=’love’)
Package: sermos-tools
Sermos ToolsTool Catalog for use in Sermos applications.PhilosophyThere are countless tasks that take place in a typical 'data science enabled'
workflow and many of them arecommon. Sermos Tools are intended to provide
instant access to tooling that accomplishes those common tasks so you can move
quickly and with confidence. A Sermos Tool has been tested in production, comes
with specific python requirements and with a curated Docker environment to
ensure the tool runs in a containerized environment (without you fighting with
underlying system dependencies!).Building a ToolTODOAdd details!TestingTesting is a critical part of the Sermos Tools ecosystem. Every tool that is
accepted into the production Tool Catalog must have appropriate tests with
reasonable test coverage and hygeine.Run TestsTo run the tests, ensure you've installed thetestextras
(pip install -e .[test]). Sermos currently supports Python 3.7+.Run tests for all tools:$ toxTo run tests for one or more select tests, provide a comma-separated list of
environment names, which match the name of the tools/{{dirname}}$ tox -e date_extractor,hasherContributorsThank you to everyone who has helped in our quest to put machine learning
to work in the real-world!Kevin LyonsAlejandro MesaCassie BorishVickram PremakumarAral TasherAkshay PakhleGilman CallsenYour Name Here!
Package: sermos-utils
Sermos UtilsUtilities for interacting with Sermos.DeploymentsPrerequisitesTo deploy your application to Sermos, there are a few prerequisites:Deployment environment created and configuredAnaccess keyhas been issued for that deploymentYour app is a valid Python package with a standard structure (see below)You have asermos.yamlfile written with your defined API endpoints, workers, etc.Your application hassermos-utilsas a dependency and it's installed.DeploymentYou can initiate a Sermos deployment in two ways: programmatically or using the
CLI tool.It is recommended to keep your access key in the environment and to set the
client package directory in the environment as well, for convenience.SERMOS_ACCESS_KEY=abc123
SERMOS_CLIENT_PKG_NAME=your_packageProgrammatic DeploymentInvoking a pipeline programmatically (e.g. as part of a build pipeline) can
be done similar to below (assumes access key/client package directory
are available in the environment per note above).from sermos_utils.deploy import SermosDeploy

sd = SermosDeploy()
status = sd.invoke_deployment()
print(status)CLI DeploymentFor a cli-based deployment, there is asermos_deploycommand installed
as part of the sermos-utils package.honcho run -e .env sermos_deployDeployment StatusAssuming your environment is set up per notes in theDeploymentsection above:Programmatic Status Checksfrom sermos_utils.deploy import SermosDeploy

sd = SermosDeploy()
status = sd.get_deployment_status()
print(status)CLI Status Checkshoncho run -e .env sermos_statusProper Python Package StructureAssuming your package is called "my_sermos_client":/path/to/codebase/
    my-sermos-client/
        setup.py
        my_sermos_client/
            __init__.py
            sermos.yamlmy_sermos_client/__init__.pyhas only one requirement, to contain your
application's version assigned as a variable__version__, e.g.:__version__ = '0.1.0'Common practice is to use that value in yoursetup.pyfile, e.g._version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('my_sermos_client/__init__.py', 'rb') as f:
    __version__ = str(ast.literal_eval(_version_re.search(
        f.read().decode('utf-8')).group(1)))Local DevelopmentSermos provides a local development environment in two ways:Local 'sandbox' environmentCloud-connected environment that proxies into your deployment's databasesSeesermos-utils/dev/README.mdfor more information.TestingTo run the tests you need to havepyenvrunning on your system andtoxin
your environment.Refer to RhoAI documentation for instructions on installingpyenvcorrectly.Afterpyenvis intalled, then installtox$ pip install toxThen install the different python versions inpyenv$ pyenv install 3.7.4Now, run the tests:$ tox