Saravanan666/pypi-org huggingface dataset:
Package: notigen
notigen=======OpenStack-like notification generator.It works like this: In OpenStack an operation is a series of notificationsconnected by a common request_id. For example, to create an instance we wouldhave the following events:compute.run_instance.startscheduler.run_instance.startscheduler.run_instance.scheduledscheduler.run_instance.endcompute.instance.updatecompute.instance.updatecompute.instance.updatecompute.instance.updatecompute.instance.updatecompute.instance.updatecompute.run_instance.endBut, since this is a large system, we could have lots of these operationsgoing on currently. Each operation takes time to perform. So thenotifications generated by these operations are interleaved.This library simulates these many concurrent operations. You tellthe EventGenerator how many new operations to start per minuteand it will. Note that you'll get a lot more notificationis thanthe operations/second (since the operations persist over time in thefuture).The library tries to avoid bad sequences (like doing an update ona deleted instance), but it can happen in some race conditions.You can generate in real-time by passing in a real datetime oryou can generate the events as fast as possible by incrementinga starting time by the tick amount. See the examples below.To generate events in real-time ...g = notigen.EventGenerator(100)  # Number of operations per minutenow = datetime.datetime.utcnow()start = nownevents = 0while nevents < 10000:e = g.generate(now)if e:nevents += len(e)now = datetime.datetime.utcnow()To generate events as fast as possible ...g = notigen.EventGenerator(100)  # Not really relevantnow = datetime.datetime.utcnow()start = nownevents = 0while nevents < 10000:e = g.generate(now)if e:nevents += len(e)now = g.move_to_next_tick(now)Datetimes are returned as strings as OpenStack would.
Package: not-in-pandas
not-in-pandasAdds notin method to pandas.Series and pandas.DataFrame objects. Returns exactly the same as negatingisin.InstallationUsepipto install not-in-pandas.pipinstallnot-in-pandasUsageimportpandasaspdimportnot_in_pandas# on Series>>>s=pd.Series(['lama','cow','lama','beetle','lama','hippo'],name='animal')>>>s.notin(['cow','lama'])0False1False2False3True4False5TrueName:animal,dtype:bool# on DataFrame>>>df=pd.DataFrame(...{..."animal_a":["lama","cow","lama","beetle","lama"],..."animal_b":["cow","beetle","cow","hippo","lama"]...}...)>>>df.notin(['cow','lama'])animal_aanimal_b0FalseFalse1FalseTrue2FalseFalse3TrueTrue4FalseFalse5TrueTrueWhy this isn't already on Pandas?Pandas core developers thought this method would be redundant, because you achieve the same results by negating a isin method~Series.isin(['lama', 'cow']). And main files on the Pandas package are already huge and difficult to navigate, so I understand their reluctancy on adding more unnecessary stuff.I personally think this method:Improves readability a lot, specially with nested conditionsKeeps consistency with othernotmethods likeSeries.notnaorSeries.notnullIs consistent with raw Python logica not in bMakes starting programmers less annoyed because they don't find a method they think should exist (and avoids a Google search), specially if they know that.notnaalready existsI use.isina lot
Package: notint
notintInstall it from PyPipipinstallnotintInstall it from GitHubpipinstallgit+https://github.com/donno2048/notintExamplesAfter installing the package try to run this in the python console (line-by-line):fromnotintimportNotInt# Import NotIntnoin=NotInt(42)# Create a new NotInt object with the value of 42 (or else)isinstance(noin,int)# Check whether python thinks it's an intnoin==NonenoinisNonenoin==noinnoin!=noinnoin=="42"noin==42noin==43print(noin)
Package: notion2jekyll
Notion2JekyllJekyll Exporter makes your notion page toJekyll Post Markdownfile. This is usingnotion-pyto export notion page to markdown.Notion2Jekyll provides these features.Exports your notion page to the markdown file named as the jekyll-post title:yyyy-m-dd-<your page's title>Putsfront matters to the markdown file.tagslayout: postDownload images in your notion page, and automatically set the image path in the md fileYou need to rename the path when you upload in your blogInstallationUse the package managerpipto install notion2jekyll.$pipinstallnotion2jekyllUsage_Command Line$python-mnotion2jekyll#Markdown file name: <output file name(without .md)>#Token_v2: <your token_v2 on notion.so>#Notion Page Url: <your notion page to export>Usage in PythonI changed the way to use the jekyll exporter. Please follow these examples.With nothingfromnotion2jekyllimport*export_cli()With token_v2 & urlfromnotion2jekyllimport*token_v2=#<your notion token_v2>url=#<your notion page url>export_out(url,token_v2)With token_v2 & url & Notion-py Blockfromnotion2jekyllimport*token_v2=#<your notion token_v2>url=#<your notion page url>client=NotionClient(token_v2=token_v2)block=client.get_block(url)export_in(block,client)Aditional InfoExporter will make the md file and images in the folder namedpostsandposts/<your block title>The url should be the page that you want to export.The front matter in the markdown will be different based on your jekyll blog variables. So, change the front matters when you finish the export, or change the code in this project.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: notion2md
About Notion2MdNotion Markdown Exporter usingofficial notion apibynotion-sdk-pyNotion2MediumCheck outNotion2Mediumthat publishes aMediumpost fromNotionusing Notion2Md.API Key(Token)Before getting started, createan integration and find the token. →Learn more about authorization.Then save your api key(token) as your os environment variableFrom version 2.9.0, you can use--tokenor-toption to set your token key.$exportNOTION_TOKEN="{your integration token key}"Install$pipinstallnotion2mdUsage: Shell CommandNotion2md requires eitheridorurlof the Notion page/block.downloadoption will download files/images in thepathdirectory.unzippedoption makes Notion2Md exportunzippedoutput of Notion block.notion2md--download-npost-p~/MyBlog/content/posts-uhttps://notion.so/...This command will generate "post.zip" in your '~/MyBlog/content/posts' directory.Usage: Pythonfromnotion2md.exporter.blockimportMarkdownExporter,StringExporter# MarkdownExporter will make markdown file on your output pathMarkdownExporter(block_id='...',output_path='...',download=True).export()# StringExporter will return output as String typemd=StringExporter(block_id='...',output_path='...').export()To-doDownload file object(image and files)Table blocksSynced BlockPage ExporterChild pageColumn List and Column BlocksContributionPlease readContribution GuideDonationIf you thinkNotion2Mdis helpful to you, you can support me here:LicenseMIT
Package: notion2medium
About Notion2MediumPublish a post toMediumjust from yourNotion PagebyConsole CliAPI Keys(Token)Notion API Token: createan integration and find the token. →Learn more about authorization.Medium API Token: createMedium IntegrationfromMedium SettingThen save your api key(token) as your osenvironment variable$exportNOTION_TOKEN="{your integration token key}"$exportMEDIUM_TOKEN="{your integration token key}"Or add these commands to your shell config files(.bashrcor.zshrc)Install$pipinstallnotion2mediumSelectCommandRetrievesNotion Pagelist fromNotion Database.Ask user titles of Notion pages and will callpublishcommand to publish the selected page.selectcommands require eitheridorurlof the Notion Database or Page.$notion2mediumselect-i<NotionDatabaseid>PublishCommandPublishes a Medium Post fromNotion Page.Retrieves Notion Page'scontent(children blocks) as markdown and Page'stags.publishcommands require eitheridorurlof the Notion Database or Page.$notion2mediumpublish-i<NotionPageid>DonationIf you thinkNotion2Mediumis helpful to you, you can support me here:LicenseApache License 2.0
Package: notion2obsidian
Notion2obsidianNotion2obsidian is a utility and python package for convert Notion exported markdown files to Obsidian markdown files.ImportantFor nownotion2obsidianonly supports the "no sub folder" structure. Make sure you use the exported options like this:Installationpipinstallnotion2obsidianUsagenotion2obsidiannotion_folder-odest-lSince Notion will make tons of empty lines into the exported files, you can use-lto delete empty lines (but keep one before a heading line).How it worksMarkdown filesnotion2obsidianwon't change the folder structure, but the markdown file's name. Since every md file that Notion exported has an id in the name,notion2obsidianwill remove the id, unless there are two md files use the smae name.
Note that some characters, aka#^[]|\/:, are inleagle for the markdown file name in Obsidian, so they will be remove in the name.AttachmentsAttachment files, like.png,.pdfandcsv, will be all moved to theattachmentsfolder without changing the name.Links in markdown filesThere two types of link will be change:Markdown files with relative pathAttachment files with relative path
Example:[Room 1](Room%201%207a6f70896bfc4e5e976d588412b74370.md) -> [[Room 1]]
[dummy.pdf](dummy.pdf) -> [dummy.pdf](attachments/dummy.pdf)
[Untitled](Untitled%201.png) -> [Untitled](attachments/Untitled%201.png)
Package: notion2pg
When a system built withNotiondatabases reaches a sufficient scale, the need
for business intelligence arises. This requires extracting data from Notion and
loading it into a relational database.The original author didn’t find a convenient, off-the-shelf solution for this.
Services offering synchronization from Notion to a relational database rely on
clunky automations and involve manual configuration.Thus notion2pg was born.It does exactly one thing: convert any Notion database to a PostgreSQL table.
It requires zero configuration. You made changes in Notion? No worries, just
re-run notion2pg to refresh the table definition and its content.While notion2pg is currently alpha software, it imported successfully complex
databases with dozens of columns and thousands of rows. There’s a fair chance
that it will handle any human-sized Notion database.Quick startCreate a Notion integration.Share a Notion database with your integration, as well as related databases.Create a PostgreSQL database e.g.:$createusernotion$createdbnotion-OnotionInstall notion2pg (requires Python ≥ 3.8):$pipinstallnotion2pgSet Notion and PostgreSQL credentials as environment variables e.g.:$exportNOTION_TOKEN=secret_...$exportPOSTGRESQL_DSN="dbname=notion user=notion"Import your database e.g.:$notion2pg<database_id><table_name>where<database_id>can be found in the URL of your database — it’s a
UUID like858611286a7d43a197c7c0ddcc7d5a4fand<table_name>is any
valid PostgreSQL table name.Command line options--drop-existingDrop the PostgreSQL table if it exists. This is useful if you want to import a
table repeatedly, overwriting any previous version.--versionedAppend a timestamp to the name of the PostgreSQL table. Then, create a view
pointing to that table, so it can still be queried under<table name>. This
is useful if you want to import a table a repeatedly, but would rather keep
previous versions around.FAQWhy is my relation or rollup field empty?Your integration must have access not only to the table that you’re importing,
but also to every table involved in a relation or a rollup.LimitationsThe order of columns in the table isn’t preserved. This information isn’t
available in the API of Notion.Rollups “Show original” and “Show unique values” are ignored. Import the
related table and join it in your queries instead.Properties of type “people” are imported as the person ID, which is probably
not the most useful representation.Every import is a full copy. Given that Notion’s API isn’t particularly fast,
the practical limit is around 10,000 rows.Changelog0.1Initial public release.
Package: notion2vuepress
notion2vuepressnotion2vuepress is a Python package that seamlessly converts Notion notes (including text, images, and formatting) into VuePress-compatible Markdown files. Effortlessly migrate concept-based documents or blogs to a VuePress powered website while preserving structure and style. Simplify your workflow and enhance publishing capabilities.提示目前只是初步的实现，尽情期待后面的封装以及自动化的过程大致架构图获取token_v2F12进入开发者模式获取图片的token如果图片保存在notion上用到得到一直图片连接访问即可获取文章的id(page_id)https://www.notion.so/youyizhang/git-9cad24555c3648b1a902333128bf1a0d?pvs=4id = 9cad24555c3648b1a902333128bf1a0d运行的时候报错需要重新装包 notion-cobertos-fork1. pip uninstall notion-cobertos-fork
2. pip install notion-cobertos-fork
Package: notionai-py
NotionAI Python SDKThe NotionAI Python SDK is a wrapper for the NotionAI APIs with Python bindings, simplifying integration of NotionAI solutions into your projects.FeaturesFull APIs from Notion AISupport stream responseAPIAll NotionAI functionalities are supported. Check out thenotionai.pyfile to see all the available APIs.Basic API ShortcutsAPIs likeblog_post,help_me_write,help_me_edit, andsummarizeare shortcuts for the basic APIs.Advanced APIsWe also support advanced APIs that allow you to dispatch by parameters:writing_with_topicWriting for special topic
Args:
    topic (TopicEnum): the special topic
    prompt (str): prompt for writing
Example:
    ao = NotionAI(token)
    ai.writing_with_topic(TopicEnum.blog_post, "Please help to introduce Notion")writing_with_promptWriting with special prompt, like summarize, explain_this, improve_writing

Args:
    prompt_type (PromptTypeEnum): special prompt
    context (str): the context for your writing

Example:
    ai = NotionAI(token)
    ai.writing_with_prompt(PromptTypeEnum.summarize, "I am a student")translateTranslate the text
Args:
    language (TranslateLanguageEnum): target language
    context (str): context to translate

Example:
    ai = NotionAI(token)
    ai.translate(TranslateLanguageEnum.Chinese, "I am a student")change_toneChange the tone of your context
 Args:
     context (str): context to change
     tone (ToneEnum): target tone

 Returns:
     str: Response from NotionAI
 Example:
     ai = NotionAI(token)
     ai.change_tone("I am a student", ToneEnum.professional)UsageInstallpip install --upgrade notionai-pyGet Notion Token and Workspace IDTo use the NotionAI Python SDK, you need to obtain a Notion token. You can do this by following these steps:Open Chrome or Firefox DevToolsFind Cookies and copy the value fortoken_v2Find thespaceIdof your Notion workspaceget notion tokenget notion workspace idNote: Now can get Notion space id using apiimportosfromnotionaiimportNotionAITOKEN=os.getenv("NOTION_TOKEN")spaces=NotionAI.get_spaces(TOKEN)print(spaces)# the result will looks like# [{'id': 'xxxxx', 'name': 'xxxxx'}]Note2: Now supports custom api proxy linksimportosfromnotionaiimportNotionAITOKEN=os.getenv("NOTION_TOKEN")SPACE_ID=os.getenv("NOTION_SPACE_ID")API_URL="https://xxx.xxx.xxx"# this is your custom proxy linksai=NotionAI(TOKEN,SPACE_ID,api_url=API_URL)res=ai.blog_post("write a blog about the meaning of life")print(res)ExamplesCheck out theexamplesdirectory for usage examples.BasicimportosfromnotionaiimportNotionAITOKEN=os.getenv("NOTION_TOKEN")SPACE_ID=os.getenv("NOTION_SPACE_ID")defmain():ai=NotionAI(TOKEN,SPACE_ID)res=ai.blog_post("write a blog about the meaning of life")print(res)if__name__=="__main__":main()Stream APIimportosimportsysfromnotionaiimportNotionAITOKEN=os.getenv("NOTION_TOKEN")SPACE_ID=os.getenv("NOTION_SPACE_ID")defmain():ai=NotionAIStream(TOKEN,SPACE_ID)res=ai.blog_post("write a blog about the meaning of life")foriteminres:sys.stdout.write(item)if__name__=="__main__":main()WebUICheck out thewebuidirectory for instructions on how to use the NotionAI Python SDK with a web user interface.
Package: notional
notionalA high level interface and object model for the Notion SDK.  This is loosely modeled
after concepts found inSQLAlchemyandMongoEngine.  Built on the excellentnotion-sdk-pylibrary, this module provides
higher-level access to the API.:warning:Work In Progress: The interfaces in this module are still in development
and are likely to change.  Furthermore, documentation is pretty sparse so use at your
own risk!That being said, if you do use this library, pleasedrop me a message!InstallationInstall the most recent release using PyPi:pipinstallnotionalNote:it is recommended to use a virtual environment (venv) for installing libraries
to prevent conflicting dependency versions.UsageConnect to the API using an integration token or an OAuth access token:importnotionalnotion=notional.connect(auth=AUTH_TOKEN)# ¡¡ fun & profit !!Getting HelpIf you are stuck, the best place to start is theDiscussionarea.  Use this also as
a resource for asking questions or providing general suggestions.Known IssuesSeeIssueson github.Feature RequestsSeeIssueson github.ContributingI built this module so that I could interact with Notion in a way that made sense to
me.  Hopefully, others will find it useful.  If someone is particularly passionate about
this area, I would be happy to consider other maintainers or contributors.Any pull requests or other submissions are welcome.  As most open source projects go, this
is a side project.  Large submissions will take time to review for acceptance, so breaking
them into smaller pieces is always preferred.  Thanks in advance!To get started, please read the fullcontribution guide.
Package: notionapimanager
Notion API ManagerThis package implements a wrapper class around the officialNotion API.It makes it easier to read databases asPandas DataFramesand to create new registries.GitHubrepository.Documentation.PyPI.StepsObtain a Notion integration tokenYou can do it following the instructions in thisPrettyStatic blog article.Install packageInstall package fromPyPI.pipinstallnotionapimanagerBasic usage of the NotionDatabaseApiManager classNote: in Notion, adatabaseis what in SQL we would call atable.
Hence, a Notiondatabasewill be returned as a Pandas DataFrame instance.fromnotionapimanager.notion_database_api_managerimportNotionDatabaseApiManagerfromnotionapimanager.notion_property_encoderimportPropertyValueintegration_token="secret_example_integration_token_3147cefa7cd20d4s45677dfasd34"database_id_1="cc147cefa7cd20d4841469ddbd4cd893"database_id_2="cc147cef20d456461469ddbd4das4593"manager=NotionDatabaseApiManager(integration_token,[database_id_1,database_id_2])manager.connect()# Get database 1manager.get_database(database_id_1)# Insert a new entry on the database 2manager.create_page(database_id_2,[PropertyValue("Property Name","Property value"),])
Package: notion-backup
notion-backupAutomate export of Notion workspaceDeprecationThe login system does not work anymore. Its seems to be blocked by a browser integrity checkInstallationpip install --upgrade notion-backupUsagebackup_notion --output-dir='.'How it worksThe script obtains an API token by requesting a temporary password to be sent to your email address.Login information are stored in~/.notion_backup.confThe export zip is generated and downloaded to the specified directory.
Package: notioncalendarsync
The unofficial Notion API extended with the option to sync your Notion events to Google Calendar.Want to support the development and stay updated?Installationpip install notioncalendarsyncUsageYOUR NOTION TOKEN:Obtain thetoken_v2value by inspecting your browser cookies on a logged-in session on Notion.sofrom notioncalendarsync import Notion

Notion(token_v2="{{ YOUR NOTION TOKEN }}").add_events_to_google_calendar('{{ NOTION COLLECTION URL }}',timezone='Europe/Berlin')
Package: notion-cli-list-manager
⚠️ This project is still in work in progress, please forgive any little flaw here and there.Notion CLI List Manager 🗂A simple command-line tool for managingNotionListdatabases. ✨Increase your productivity with a simple command. 🛋📺 Features:fast and clear; saving your idea is as simple as typeadd "get money"💆‍♂️tables are pretty-printed with fab ASCII tables 🌈parameters are now supported [^3] 🎻👾 Get Started:Create a new internal api integrationhere.❗️ Share the default database you want to use with your integration.You can copymy free simple template.Download the tool: [^1]pip install notion-cli-list-managerSet the token and your default database id:list set --token [token] --id [database-id]You're done!🧰 Syntax:TL;DR:listis the keyword for activating this tool from the terminal. Typing justlist, the list of your default database's items will be shown. Other commands can be used typinglist [command]Commands:Args and options:listto display all theListitems.--db [id]to display a specific database. Otherwise the default database will be shown.--allto display all the lists.list add [title]to add a newListitem calledtitle.[title]will be the text of theListitem (and the title of the associated Notion database page)--db [id]to add the entry to a specific database. Otherwise, the default database will be used.list rm [index]to remove theListitem with the indexindex.(Command to call afterlist)[index]has to be formatted either like a range or a list, or a combination of these. E.g.: 3,4,6:10:2 will remove pages 3, 4, 6, 8.list dbto display all the notion display saved in the manager.--label [LABEL] --id [ID]to add a database to the manager. A prompt will then ask you the ordered indexes list.--rm [LABEL]to remove a database named [LABEL] from the manager. Note that adding or removing a database to the manager does not cause the actual creation or deletion on Notion.--prop [LABEL]to set which and in which order display the properties of an already saved database labeled [LABEL]. A prompt will then ask you the ordered indexes list[^3].list set --token [token] --id [database_id]to set the token and the ID of the Notion Database you want as default.This must be executed as the first command.You can get the[token]as internal api integrationhere.You can get the database id from the database url: notion.so/[username]/[database_id]?v=[view_id].You can also use separately--tokenand--idto set just one parameter. After the--idcommand, a prompt will then ask you the ordered indexes list.🛒 Still to do:See theproject tabfor a complete and real-time-updated list.Issues and PRs are appreciated. 🤝[^3]: At the present, properties are fully supported (except Relations and Rolls up that areNS- Not supported) but read-only. Writeable ones will be supported in the next versions.[^1]: You can also clone the repo to have always the very last version.Having installed Python3 and Pip3 on your machine, write on the terminal:git clone https://github.com/jacksalici/notion-cli-list-manager.git notion-cli-list-managerpip3 install notion-cli-list-manager/dist/notion-cli-list-manager-[last-version].tar.gz