Since the topic came up with BREXIT over London-City possibly going to a referendum and exiting the United Kingdom and becoming it's own state.....thus entering an application to the EU....one has to go back and ask if there were other city-states in existence.
The short answer is yes.
One example if the city of Frankfurt, Germany.....which existed for roughly 500 years as a entity unto itself.
Frankfurt, by the close of the Roman Empire period....was one of the top twenty German-Roman cities in existence. After the empire came to a close.....they held regional elections (885 AD) and came around in 1372 to declare themselves an Imperial Free City (Reichstadt).
Oddly, Frankfurt survives through the French invasion in the early 1800s, and end up as a Principality. By 1810, Frankfurt (the Principality) ends up combining with Wetzlar (a county at that point), the city of Fulda and Hanau......to form what is the Grand Duchy of Frankfurt.
After the Napoleon period....they more or less became a sovereign city-state.
So we drift around to the revolution period of Germany (1848) where the Frankfurt Parliament called for a unification of all German states under their banner. Prussia....naturally.....refused to see this as the answer. Roughly twenty years would pass, and by 1866....Prussia went into the Austro-Prussian War, with the full intent of taking possession of not only Schleswig-Holsetein, Bavaria, Nassau (what is today Hessen) and the city-state of Frankfurt.
At the conclusion of this minor war with the Hapsburg Empire of Austria....Frankfurt was forced into the new state of Hessen (taking Nassau and Frankfurt together). Since that day, Frankfurt has been part of Hessen, and a German city.
A hostility over the Prussian take-over? It was anything but friendly. In the end, the Prussians shut down every single printing press in Frankfurt except the one which was Prussian-friendly....so news in the new city of Frankfurt under Prussia was tightly controlled and ensured public confidence in their system whether they liked it or not.
Over one-hundred-and-fifty years have passed since the city-state ended....and if you asked most people from Frankfurt....I doubt if more than 10-percent know the basic story to the city-state. Today, if it were existing.....with Fulda and Hanau included.....it would be over one million people